Question: Multithreading loops

How is it possible to let multiple cores compute a loop faster?

For exaple:

for i = 1 to 1000 do


end do

The goal is to let a quad core cpu split the 1000 independant computations in 4 packages of 250 each to speed up the computation by the factor 4 so that core1 computes i from 1 to 250, core2 from 251 to 500 and so on, at the same time. Is this possible?

Please Wait...