In this case, I think he has four shovels available (quad core). The mosh pit mine analogy still holds however. Throw in a long, slow, creaky elevator ride for the start/reap of miner threads. Shoving a million people into the mine and bringing them back out takes far longer than it does to actually swing the four shovels a quarter million times each.
The code should probably be refactored into four guys sharing the four shovels, with a list of places to dig next after they finish their current one, and only take the expensive elevator back up to the surface when everything is done. If there is a lot of I/O paperwork to do before swinging the shovel each time, then you could use three or four miners per shovel; most of them won't need the shovel at any one time.
In reply to Re^2: ForkManager Running Real Slow
by SuicideJunkie
in thread ForkManager Running Real Slow
by zacc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |