You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
603: add demo to simulate usage in a game engine r=cuviper a=mdonoughe
It has been observed in amethyst/amethyst#780 that if you use Rayon in an environment where you are not CPU bound, you may end up using many more CPU cycles than necessary. This pull request adds an example of this problem to the demo project as a starting point towards finding a way to improve efficiency in this scenario.
The life demo now has a `play` mode where the same comparison of serial and parallel occurs, but with a frame (generation) per second limit in place and comparing CPU time measurements at the end.
Example output for my Ryzen 7 1800X with hyperthreading (16 logical processors) in Windows 10:
$ rayon-demo life play
serial: 59.93 fps
cpu usage: 4.7%
parallel: 59.97 fps
cpu usage: 55.3%
par_bridge: 59.94 fps
cpu usage: 1164.1%
Once there are ways to improve the overhead they should be incorporated into this demo as an example. If there are already ways to improve the demo let me know and I can try to implement them now.
Co-authored-by: Matthew Donoughe <[email protected]>
0 commit comments