[Merged by Bors] - Commands benchmarking#2334
[Merged by Bors] - Commands benchmarking#2334NathanSWard wants to merge 2 commits intobevyengine:mainfrom
Commands benchmarking#2334Conversation
|
I'm not too happy with these current benchmarks. |
|
A seeded RNG for optionally adding these components would be useful imo |
3d19323 to
873906c
Compare
|
Looking at the benches, it feels like they test more entity spawning and component insertion than commands themselves. Would it be interesting to add a dummy command that doesn't do much and use it in a bench? |
77a777f to
5565020
Compare
Yep, I like this idea :) |
bbcdc6f to
1cc6a6e
Compare
|
to show even more the impact of the size of the command, you could try with
|
Would the idea be to run benchmarks where you add only |
Also by |
16adc08 to
d221214
Compare
... probably? 😄
I think you picked a good value 👍 My idea was to explore how your other pr on commands would impact various sized commands, looks like you found something interesting with 12 bytes commands! |
|
Ideally I'd like to merge this first, then merge #2332. |
|
RNG has overhead that I'm worried will get in the way of showing the actual cost of these operations. The goal of rng here is to produce "different archetype shapes", but we could almost as easily hard code these shapes, which would also give us the benefit of reproducibility. |
Hopefully with a seeded-rng this would lessen the impact of rng, however, it is still rng soo... 🤷 However, we can achieve similar results with just a modulo inside a |
b716d3d to
a2d543d
Compare
|
bors r+ |
# Objective - Currently the `Commands` and `CommandQueue` have no performance testing. - As `Commands` are quite expensive due to the `Box<dyn Command>` allocated for each command, there should be perf tests for implementations that attempt to improve the performance. ## Solution - Add some benchmarking for `Commands` and `CommandQueue`.
|
Pull request successfully merged into main. Build succeeded: |
Commands benchmarkingCommands benchmarking
# Objective - Currently the `Commands` and `CommandQueue` have no performance testing. - As `Commands` are quite expensive due to the `Box<dyn Command>` allocated for each command, there should be perf tests for implementations that attempt to improve the performance. ## Solution - Add some benchmarking for `Commands` and `CommandQueue`.
Objective
CommandsandCommandQueuehave no performance testing.Commandsare quite expensive due to theBox<dyn Command>allocated for each command, there should be perf tests for implementations that attempt to improve the performance.Solution
CommandsandCommandQueue.