Great and you really believe this accelerates a program? Starting a
thread takes a lot of time and such loops are usually memory throughput
bound.
OK, I should not have used 10 as the element but 1000000 :). And of course it makes more sense if a more complex calculation is to be done in each loop. But exactly this issue (lots of independent calculations in parallel) is a widely seen task (e.g points in physical fields).

Of course the RTL is not supposed to start a thread for each of the loop runs but assign a number of them to a couple of threads.

-Michael
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to