4 ms·
>On my 4-core (8 virtual cores) i7 MacBook, with 10,000 spaceships, I get close to 10 simulation cycles per second. [...] > When running the simulation synchro
by perlgeek 13y ago
>On my 4-core (8 virtual cores) i7 MacBook, with 10,000 spaceships, I get close to 10 simulation cycles per second. [...]
> When running the simulation synchronously, i.e. with a phaser, performance drops to about 8 cycles per second on my development machine.
> Performance – we are able to fully exploit the computing power of modern multi-core hardware.
So, 25% faster with 8 cores is "fully exploit the computing power of modern multi-core hardware". WTF?
- wtetzner 13y agoWhen he says he's using a phaser, he means that updates happen in lockstep. Each update still happens on multiple cores, but each fiber will not move on to the next update until all of the other fibers have finished the current update. So it's not synchronous in the sense that it's running everything sequentially.
- pron 13y agoExactly. Still parallel, but don't start the next cycle until the previous one has completed.
- Morgawr 13y ago8 cores != 8x speedup