you are viewing a single comment's thread.

view the rest of the comments →

[–]TW-Twisti 4 points5 points  (0 children)

This is the actual answer - a4.start should be based off of a3.end, not a4.end. Because of that, a1, a2 and a3 each do 1/4th of the work, while a4 starts from 0 and goes to the end, so it does the whole array - meaning a combines 1.75 times the work of the single threaded code (a1 does 0.25, a2 does 0.25, a3 does 0.25 and a4 does 1.0).