Removed per thread output, as it was done inside the loop, and printing to stdout is slow. Also moved a divide out of the thread function, as divides are ouch slow.