cleaned some comments
Better parallel performance for efficient version

Add write_locks to enable better for loop parallelism