in reply to Re: ForkManager Running Real Slow
in thread ForkManager Running Real Slow
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: ForkManager Running Real Slow
by BrowserUk (Patriarch) on Sep 04, 2009 at 14:02 UTC | |
by SuicideJunkie (Vicar) on Sep 04, 2009 at 14:34 UTC | |
by roboticus (Chancellor) on Sep 04, 2009 at 16:17 UTC |