I have rerun the benchmarks now after optimizing the C++ version the best "I" could:
So, I added pthreads to the ray-tracer program: http://pastebin.com/6V5JYyZG
Included in the paste are the execution times on my lowly dual-core laptop. Spawning more threads speeds up the program. I would be curious to see how it scales to more cores on modern CPUs. If you have a chance, won't you please give it a try on your system and let me know how changing the number of threads affects execution time?
For anyone who wants to try pthreads in C, the simplest example and progressions I could find were here: http://cs.gmu.edu/~white/CS571/Examples/pthread_examples.htm...