optimized parallel row algorithm speed