Open ElliotB256 opened 3 years ago
Discussions still ongoing.
In the meantime, added some examples to compare against legion, using 39a2723e.
legion: 1.5s
It was foolish of me to not separate the entity creation time from the loop run time, so I'll add that for each below:
ECS | create entities | run loop |
---|---|---|
bevy | 0.65 | 6.78 |
specs | 0.03 | 0.54 |
legion | 0.82 | 0.70 |
TheRawMeatball took a look and made some changes, I have not yet added those bench numbers
Updates to bevy example, now running on 9d56a6f3de5e.
bevy: 1.12
Note: Graphs below use a longer sim of 5xN steps.
Including new results:
ECS | create entities | run loop |
---|---|---|
bevy | 0.01 | 1.11 |
specs | 0.03 | 0.54 |
legion | 0.82 | 0.70 |
Since bevy 0.6 was just released, I have run the benchmark with bevy updated to 0.6 and have everything else kept the same. Unfortunately, on my machine (i7-7700hq, 16g, Ubuntu 21.10), I did not see a significant improvement for this particular benchmark.
I'm using the two examples listed in this repo. Stats are for 1a6b9fd52.
The minimal example consists of a velocity-verlet integration of non-interacting particles in a harmonic trap. It consists of three systems: (i) integrate position, (ii) update force, (iii) integrate velocity. The benchmark integrates the following particle numbers for N steps:
I'm performing my profiling on a workstation with an i7-8700 CPU, which has 6 cores and 12 threads. The profiling is performed using Intel VTune, Microarchitecture Exploration runs.
Results
My tests show
bevy
currently underperformsspecs
by at least an order of magnitude.Total time
bevy: 7.417s
specs: 0.576s
CPU Load
bevy:
specs:
Core Utilisation
bevy:
specs:
Summary
bevy:
specs:
Disclaimer
I might well be an idiot. It's my first time using bevy, there could be something very obviously incorrect with this. I'd still be grateful to hear that :)