Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Newtype ArchetypeRow and TableRow #4878

Closed
wants to merge 32 commits into from

Conversation

james7132
Copy link
Member

@james7132 james7132 commented May 31, 2022

Objective

Prevent future unsoundness that was seen in #6623.

Solution

Newtype both indexes in Archetype and Table as ArchetypeRow and TableRow. This avoids weird numerical manipulation on the indices, and can be stored and treated opaquely. Also enforces the source and destination of where these indices at a type level.


Changelog

Changed: Archetype indices and Table rows have been newtyped as ArchetypeRow and TableRow.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Benchmarking This set of changes needs performance benchmarking to double-check that they help labels May 31, 2022
@james7132 james7132 added the M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label May 31, 2022
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes and motivation look good. Approval conditional on non-regressing benchmarks :)

@james7132
Copy link
Member Author

james7132 commented Jun 1, 2022

A quick round of benchmarks seems to show regressions in dense iteration with a significant speedup to World::entity and World::get, not unlike the results from #3678, which also shrunk EntityMeta. Pretty sure this could be resolved from the cleanup in #4800 as a lot of the u32 -> usize casts are happening in areas that are removed/reduced in that PR. Marking this as blocked on that cleanup, as this otherwise would likely be an unacceptable regression.

group                                                    archetype-row-u32                       main
-----                                                    -----------------                       ----
add_remove_component/sparse_set                          1.00  1249.1±79.08µs        ? ?/sec     1.06  1326.2±83.48µs        ? ?/sec
add_remove_component/table                               1.00  1558.5±50.69µs        ? ?/sec     1.07  1667.2±95.69µs        ? ?/sec
add_remove_component_big/sparse_set                      1.00  1401.4±306.67µs        ? ?/sec    1.09  1533.4±307.70µs        ? ?/sec
add_remove_component_big/table                           1.00      3.3±0.34ms        ? ?/sec     1.05      3.5±0.45ms        ? ?/sec
added_archetypes/archetype_count/100                     1.07  1391.4±48.59µs        ? ?/sec     1.00  1305.4±41.35µs        ? ?/sec
added_archetypes/archetype_count/1000                    1.22      2.4±0.20ms        ? ?/sec     1.00  1941.2±96.01µs        ? ?/sec
added_archetypes/archetype_count/10000                   1.09     19.8±1.56ms        ? ?/sec     1.00     18.1±2.15ms        ? ?/sec
added_archetypes/archetype_count/200                     1.08  1492.0±59.29µs        ? ?/sec     1.00  1381.9±47.51µs        ? ?/sec
added_archetypes/archetype_count/2000                    1.05      4.3±0.17ms        ? ?/sec     1.00      4.1±0.19ms        ? ?/sec
added_archetypes/archetype_count/500                     1.17  1853.2±81.70µs        ? ?/sec     1.00  1584.1±48.62µs        ? ?/sec
added_archetypes/archetype_count/5000                    1.13     10.1±0.68ms        ? ?/sec     1.00      8.9±0.51ms        ? ?/sec
busy_systems/01x_entities_03_systems                     1.42     48.9±1.85µs        ? ?/sec     1.00     34.5±1.38µs        ? ?/sec
busy_systems/01x_entities_06_systems                     1.31     85.2±4.05µs        ? ?/sec     1.00     65.1±2.18µs        ? ?/sec
busy_systems/01x_entities_09_systems                     1.22    129.0±8.24µs        ? ?/sec     1.00    106.0±4.65µs        ? ?/sec
busy_systems/01x_entities_12_systems                     1.22    157.6±4.38µs        ? ?/sec     1.00    129.4±3.94µs        ? ?/sec
busy_systems/01x_entities_15_systems                     1.21    195.8±4.20µs        ? ?/sec     1.00    162.4±4.38µs        ? ?/sec
busy_systems/02x_entities_03_systems                     1.23     82.2±3.36µs        ? ?/sec     1.00     67.1±5.11µs        ? ?/sec
busy_systems/02x_entities_06_systems                     1.22    142.8±6.59µs        ? ?/sec     1.00    117.5±4.45µs        ? ?/sec
busy_systems/02x_entities_09_systems                     1.27    227.3±7.73µs        ? ?/sec     1.00    179.6±8.45µs        ? ?/sec
busy_systems/02x_entities_12_systems                     1.23    286.7±9.65µs        ? ?/sec     1.00    232.6±6.51µs        ? ?/sec
busy_systems/02x_entities_15_systems                     1.15   341.6±14.59µs        ? ?/sec     1.00   297.5±13.46µs        ? ?/sec
busy_systems/03x_entities_03_systems                     1.15    120.2±6.28µs        ? ?/sec     1.00    104.3±5.90µs        ? ?/sec
busy_systems/03x_entities_06_systems                     1.19   225.5±21.42µs        ? ?/sec     1.00   190.1±10.71µs        ? ?/sec
busy_systems/03x_entities_09_systems                     1.23   333.8±12.42µs        ? ?/sec     1.00   270.5±11.88µs        ? ?/sec
busy_systems/03x_entities_12_systems                     1.13   404.8±17.19µs        ? ?/sec     1.00   359.6±19.62µs        ? ?/sec
busy_systems/03x_entities_15_systems                     1.19   507.5±23.51µs        ? ?/sec     1.00   427.1±20.75µs        ? ?/sec
busy_systems/04x_entities_03_systems                     1.21    166.4±9.12µs        ? ?/sec     1.00   137.1±10.09µs        ? ?/sec
busy_systems/04x_entities_06_systems                     1.21   296.7±16.47µs        ? ?/sec     1.00   245.3±11.59µs        ? ?/sec
busy_systems/04x_entities_09_systems                     1.16   426.7±18.61µs        ? ?/sec     1.00   368.9±21.55µs        ? ?/sec
busy_systems/04x_entities_12_systems                     1.19   548.7±20.66µs        ? ?/sec     1.00   461.3±22.06µs        ? ?/sec
busy_systems/04x_entities_15_systems                     1.14   648.4±32.27µs        ? ?/sec     1.00   568.9±21.78µs        ? ?/sec
busy_systems/05x_entities_03_systems                     1.11    203.8±8.48µs        ? ?/sec     1.00   183.0±16.69µs        ? ?/sec
busy_systems/05x_entities_06_systems                     1.15   381.4±26.01µs        ? ?/sec     1.00   330.7±22.33µs        ? ?/sec
busy_systems/05x_entities_09_systems                     1.16   518.8±22.67µs        ? ?/sec     1.00   447.9±21.98µs        ? ?/sec
busy_systems/05x_entities_12_systems                     1.11   682.8±43.26µs        ? ?/sec     1.00   614.7±31.44µs        ? ?/sec
busy_systems/05x_entities_15_systems                     1.14   852.6±46.03µs        ? ?/sec     1.00   746.1±33.26µs        ? ?/sec
contrived/01x_entities_03_systems                        1.28     30.9±0.77µs        ? ?/sec     1.00     24.0±1.15µs        ? ?/sec
contrived/01x_entities_06_systems                        1.23     56.9±1.60µs        ? ?/sec     1.00     46.4±1.90µs        ? ?/sec
contrived/01x_entities_09_systems                        1.30     81.8±1.80µs        ? ?/sec     1.00     63.0±3.29µs        ? ?/sec
contrived/01x_entities_12_systems                        1.32    108.5±2.84µs        ? ?/sec     1.00     82.1±3.93µs        ? ?/sec
contrived/01x_entities_15_systems                        1.29    135.1±2.78µs        ? ?/sec     1.00    104.5±3.86µs        ? ?/sec
contrived/02x_entities_03_systems                        1.21     45.7±1.09µs        ? ?/sec     1.00     37.7±1.94µs        ? ?/sec
contrived/02x_entities_06_systems                        1.27     87.1±2.50µs        ? ?/sec     1.00     68.4±4.43µs        ? ?/sec
contrived/02x_entities_09_systems                        1.29    126.6±3.10µs        ? ?/sec     1.00     98.4±2.67µs        ? ?/sec
contrived/02x_entities_12_systems                        1.25    165.4±3.65µs        ? ?/sec     1.00   132.5±10.57µs        ? ?/sec
contrived/02x_entities_15_systems                        1.24    197.3±3.83µs        ? ?/sec     1.00    159.3±5.83µs        ? ?/sec
contrived/03x_entities_03_systems                        1.26     58.7±2.39µs        ? ?/sec     1.00     46.6±2.58µs        ? ?/sec
contrived/03x_entities_06_systems                        1.33    116.5±3.37µs        ? ?/sec     1.00     87.8±6.44µs        ? ?/sec
contrived/03x_entities_09_systems                        1.20    165.4±4.80µs        ? ?/sec     1.00   137.4±22.12µs        ? ?/sec
contrived/03x_entities_12_systems                        1.20    215.8±5.27µs        ? ?/sec     1.00    180.2±7.70µs        ? ?/sec
contrived/03x_entities_15_systems                        1.22    263.1±5.51µs        ? ?/sec     1.00   214.9±11.06µs        ? ?/sec
contrived/04x_entities_03_systems                        1.31     75.4±2.77µs        ? ?/sec     1.00     57.3±2.52µs        ? ?/sec
contrived/04x_entities_06_systems                        1.30    141.2±4.62µs        ? ?/sec     1.00    108.4±4.45µs        ? ?/sec
contrived/04x_entities_09_systems                        1.28    208.0±7.89µs        ? ?/sec     1.00    162.3±7.43µs        ? ?/sec
contrived/04x_entities_12_systems                        1.27   269.0±10.70µs        ? ?/sec     1.00    212.0±9.30µs        ? ?/sec
contrived/04x_entities_15_systems                        1.20   325.0±10.23µs        ? ?/sec     1.00    269.8±8.24µs        ? ?/sec
contrived/05x_entities_03_systems                        1.41     95.1±3.71µs        ? ?/sec     1.00     67.3±3.71µs        ? ?/sec
contrived/05x_entities_06_systems                        1.26    167.0±6.63µs        ? ?/sec     1.00    133.0±7.40µs        ? ?/sec
contrived/05x_entities_09_systems                        1.35   267.6±29.95µs        ? ?/sec     1.00    198.7±7.60µs        ? ?/sec
contrived/05x_entities_12_systems                        1.25   331.5±16.51µs        ? ?/sec     1.00   265.4±12.66µs        ? ?/sec
contrived/05x_entities_15_systems                        1.16   379.3±19.00µs        ? ?/sec     1.00   327.3±12.49µs        ? ?/sec
empty_commands/0_entities                                1.01      5.2±0.16ns        ? ?/sec     1.00      5.2±0.12ns        ? ?/sec
empty_systems/000_systems                                1.55      3.1±0.17µs        ? ?/sec     1.00  1980.0±251.38ns        ? ?/sec
empty_systems/001_systems                                1.00      5.3±0.29µs        ? ?/sec     1.11      5.9±0.28µs        ? ?/sec
empty_systems/002_systems                                1.00      6.6±0.31µs        ? ?/sec     1.07      7.0±0.51µs        ? ?/sec
empty_systems/003_systems                                1.00      8.1±0.29µs        ? ?/sec     1.01      8.2±0.58µs        ? ?/sec
empty_systems/004_systems                                1.01      9.3±0.33µs        ? ?/sec     1.00      9.2±0.54µs        ? ?/sec
empty_systems/005_systems                                1.00     10.4±0.37µs        ? ?/sec     1.00     10.5±0.52µs        ? ?/sec
empty_systems/010_systems                                1.04     16.8±0.85µs        ? ?/sec     1.00     16.2±0.93µs        ? ?/sec
empty_systems/015_systems                                1.16     23.0±0.72µs        ? ?/sec     1.00     19.8±1.23µs        ? ?/sec
empty_systems/020_systems                                1.16     28.7±0.76µs        ? ?/sec     1.00     24.8±2.44µs        ? ?/sec
empty_systems/025_systems                                1.24     34.4±1.12µs        ? ?/sec     1.00     27.9±2.00µs        ? ?/sec
empty_systems/030_systems                                1.22     40.4±0.90µs        ? ?/sec     1.00     33.0±2.21µs        ? ?/sec
empty_systems/035_systems                                1.25     46.4±1.08µs        ? ?/sec     1.00     37.0±2.42µs        ? ?/sec
empty_systems/040_systems                                1.26     52.0±1.09µs        ? ?/sec     1.00     41.2±2.57µs        ? ?/sec
empty_systems/045_systems                                1.25     56.7±1.17µs        ? ?/sec     1.00     45.4±3.43µs        ? ?/sec
empty_systems/050_systems                                1.28     62.2±1.34µs        ? ?/sec     1.00     48.6±2.82µs        ? ?/sec
empty_systems/055_systems                                1.29     68.0±2.11µs        ? ?/sec     1.00     52.8±3.80µs        ? ?/sec
empty_systems/060_systems                                1.31     72.6±1.43µs        ? ?/sec     1.00     55.6±3.57µs        ? ?/sec
empty_systems/065_systems                                1.29     79.1±2.01µs        ? ?/sec     1.00     61.2±4.17µs        ? ?/sec
empty_systems/070_systems                                1.34     84.8±3.42µs        ? ?/sec     1.00     63.6±3.90µs        ? ?/sec
empty_systems/075_systems                                1.33     90.6±3.27µs        ? ?/sec     1.00     68.1±4.07µs        ? ?/sec
empty_systems/080_systems                                1.35     94.9±2.82µs        ? ?/sec     1.00     70.4±3.95µs        ? ?/sec
empty_systems/085_systems                                1.35    101.4±2.60µs        ? ?/sec     1.00     75.3±5.33µs        ? ?/sec
empty_systems/090_systems                                1.35    107.2±2.30µs        ? ?/sec     1.00     79.4±5.76µs        ? ?/sec
empty_systems/095_systems                                1.36    112.5±2.56µs        ? ?/sec     1.00     82.7±6.90µs        ? ?/sec
empty_systems/100_systems                                1.38    117.9±2.46µs        ? ?/sec     1.00     85.7±4.54µs        ? ?/sec
fake_commands/2000_commands                              1.00      6.8±0.21µs        ? ?/sec     1.07      7.3±0.04µs        ? ?/sec
fake_commands/4000_commands                              1.00     13.6±0.74µs        ? ?/sec     1.05     14.3±0.15µs        ? ?/sec
fake_commands/6000_commands                              1.00     20.1±0.15µs        ? ?/sec     1.08     21.7±0.11µs        ? ?/sec
fake_commands/8000_commands                              1.00     27.5±0.98µs        ? ?/sec     1.06     29.1±0.15µs        ? ?/sec
fragmented_iter/base                                     1.06   488.2±31.46ns        ? ?/sec     1.00   458.8±19.03ns        ? ?/sec
fragmented_iter/foreach                                  1.00   237.0±26.89ns        ? ?/sec     1.02   241.9±28.67ns        ? ?/sec
get_component/base                                       1.00  1070.9±31.07µs        ? ?/sec     1.02  1088.4±79.34µs        ? ?/sec
get_component/system                                     1.01   797.2±68.78µs        ? ?/sec     1.00   791.5±78.27µs        ? ?/sec
get_or_spawn/batched                                     1.02   416.9±50.92µs        ? ?/sec     1.00   408.2±20.63µs        ? ?/sec
get_or_spawn/individual                                  1.00   933.7±85.00µs        ? ?/sec     1.00   931.3±81.29µs        ? ?/sec
heavy_compute/base                                       1.03    376.3±7.55µs        ? ?/sec     1.00    367.1±5.29µs        ? ?/sec
insert_commands/insert                                   1.00   772.4±36.59µs        ? ?/sec     1.03   791.9±34.36µs        ? ?/sec
insert_commands/insert_batch                             1.00   404.8±23.31µs        ? ?/sec     1.00   403.2±48.73µs        ? ?/sec
no_archetypes/system_count/0                             1.87      3.0±0.17µs        ? ?/sec     1.00  1610.0±326.88ns        ? ?/sec
no_archetypes/system_count/100                           1.13    115.0±2.39µs        ? ?/sec     1.00    101.7±3.54µs        ? ?/sec
no_archetypes/system_count/20                            1.00     24.8±0.73µs        ? ?/sec     1.05     26.0±2.92µs        ? ?/sec
no_archetypes/system_count/40                            1.00     44.0±0.83µs        ? ?/sec     1.05     46.0±2.26µs        ? ?/sec
no_archetypes/system_count/60                            1.16     71.4±0.93µs        ? ?/sec     1.00     61.7±3.28µs        ? ?/sec
no_archetypes/system_count/80                            1.38     93.9±1.65µs        ? ?/sec     1.00     68.1±3.27µs        ? ?/sec
query_get/50000_entities_sparse                          1.01  1108.2±78.19µs        ? ?/sec     1.00  1099.2±143.05µs        ? ?/sec
query_get/50000_entities_table                           1.19  746.6±327.95µs        ? ?/sec     1.00   626.9±59.29µs        ? ?/sec
query_get_component/50000_entities_sparse                1.01  1211.3±124.46µs        ? ?/sec    1.00  1198.5±111.82µs        ? ?/sec
query_get_component/50000_entities_table                 1.00  1183.6±81.07µs        ? ?/sec     1.02  1203.7±54.86µs        ? ?/sec
run_criteria/no/001_systems                              1.00      3.3±0.39µs        ? ?/sec     1.35      4.5±0.57µs        ? ?/sec
run_criteria/no/006_systems                              1.00      4.0±0.46µs        ? ?/sec     1.42      5.7±0.77µs        ? ?/sec
run_criteria/no/011_systems                              1.00      3.2±0.59µs        ? ?/sec     1.39      4.5±1.77µs        ? ?/sec
run_criteria/no/016_systems                              1.00      3.2±0.64µs        ? ?/sec     1.19      3.8±1.89µs        ? ?/sec
run_criteria/no/021_systems                              1.00      3.5±0.94µs        ? ?/sec     1.23      4.3±1.34µs        ? ?/sec
run_criteria/no/026_systems                              1.00      3.6±1.16µs        ? ?/sec     1.23      4.4±1.64µs        ? ?/sec
run_criteria/no/031_systems                              1.00      4.1±2.15µs        ? ?/sec     1.22      4.9±1.59µs        ? ?/sec
run_criteria/no/036_systems                              1.00      5.1±1.61µs        ? ?/sec     1.21      6.2±2.17µs        ? ?/sec
run_criteria/no/041_systems                              1.00      5.4±2.15µs        ? ?/sec     1.15      6.3±1.77µs        ? ?/sec
run_criteria/no/046_systems                              1.00      5.5±2.02µs        ? ?/sec     1.40      7.6±3.22µs        ? ?/sec
run_criteria/no/051_systems                              1.00      6.7±2.13µs        ? ?/sec     1.43      9.5±4.32µs        ? ?/sec
run_criteria/no/056_systems                              1.00      9.1±3.17µs        ? ?/sec     1.15     10.5±4.09µs        ? ?/sec
run_criteria/no/061_systems                              1.00     11.6±4.61µs        ? ?/sec     1.10     12.8±4.92µs        ? ?/sec
run_criteria/no/066_systems                              1.00     14.0±4.26µs        ? ?/sec     1.03     14.4±4.58µs        ? ?/sec
run_criteria/no/071_systems                              1.00     15.4±4.28µs        ? ?/sec     1.46     22.6±1.17µs        ? ?/sec
run_criteria/no/076_systems                              1.00     17.4±4.06µs        ? ?/sec     1.06     18.4±4.58µs        ? ?/sec
run_criteria/no/081_systems                              1.00     18.7±4.20µs        ? ?/sec     1.05     19.5±2.85µs        ? ?/sec
run_criteria/no/086_systems                              1.00     20.5±3.37µs        ? ?/sec     1.06     21.7±2.07µs        ? ?/sec
run_criteria/no/091_systems                              1.00     21.6±2.07µs        ? ?/sec     1.00     21.6±2.31µs        ? ?/sec
run_criteria/no/096_systems                              1.00     21.9±1.38µs        ? ?/sec     1.07     23.5±1.37µs        ? ?/sec
run_criteria/no/101_systems                              1.02     22.8±0.62µs        ? ?/sec     1.00     22.3±1.33µs        ? ?/sec
run_criteria/no_with_labels/001_systems                  1.00      3.3±0.35µs        ? ?/sec     1.09      3.6±0.46µs        ? ?/sec
run_criteria/no_with_labels/006_systems                  1.00      3.9±0.76µs        ? ?/sec     1.06      4.2±0.54µs        ? ?/sec
run_criteria/no_with_labels/011_systems                  1.00      3.4±0.50µs        ? ?/sec     1.05      3.5±0.54µs        ? ?/sec
run_criteria/no_with_labels/016_systems                  1.07      3.1±0.50µs        ? ?/sec     1.00      2.9±0.58µs        ? ?/sec
run_criteria/no_with_labels/021_systems                  1.00      3.0±0.69µs        ? ?/sec     1.14      3.4±0.80µs        ? ?/sec
run_criteria/no_with_labels/026_systems                  1.10      3.6±1.51µs        ? ?/sec     1.00      3.3±0.89µs        ? ?/sec
run_criteria/no_with_labels/031_systems                  1.12      4.5±1.55µs        ? ?/sec     1.00      4.0±0.90µs        ? ?/sec
run_criteria/no_with_labels/036_systems                  1.20      5.5±1.87µs        ? ?/sec     1.00      4.6±1.58µs        ? ?/sec
run_criteria/no_with_labels/041_systems                  1.03      4.7±2.00µs        ? ?/sec     1.00      4.6±1.31µs        ? ?/sec
run_criteria/no_with_labels/046_systems                  1.00      4.7±1.64µs        ? ?/sec     1.03      4.9±1.74µs        ? ?/sec
run_criteria/no_with_labels/051_systems                  1.14      6.5±2.72µs        ? ?/sec     1.00      5.7±1.96µs        ? ?/sec
run_criteria/no_with_labels/056_systems                  1.27      7.5±3.26µs        ? ?/sec     1.00      5.9±1.64µs        ? ?/sec
run_criteria/no_with_labels/061_systems                  1.06      7.5±3.37µs        ? ?/sec     1.00      7.0±2.74µs        ? ?/sec
run_criteria/no_with_labels/066_systems                  1.00      8.9±3.76µs        ? ?/sec     1.23     11.0±4.65µs        ? ?/sec
run_criteria/no_with_labels/071_systems                  1.00     10.1±4.27µs        ? ?/sec     1.09     11.0±3.82µs        ? ?/sec
run_criteria/no_with_labels/076_systems                  1.00     11.2±4.98µs        ? ?/sec     1.04     11.7±3.92µs        ? ?/sec
run_criteria/no_with_labels/081_systems                  1.00     13.2±4.26µs        ? ?/sec     1.01     13.4±4.55µs        ? ?/sec
run_criteria/no_with_labels/086_systems                  1.00     14.3±4.87µs        ? ?/sec     1.14     16.3±4.06µs        ? ?/sec
run_criteria/no_with_labels/091_systems                  1.00     15.8±4.68µs        ? ?/sec     1.08     17.0±3.74µs        ? ?/sec
run_criteria/no_with_labels/096_systems                  1.00     17.9±4.85µs        ? ?/sec     1.03     18.5±3.76µs        ? ?/sec
run_criteria/no_with_labels/101_systems                  1.00     18.7±4.09µs        ? ?/sec     1.07     20.0±2.32µs        ? ?/sec
run_criteria/yes/001_systems                             1.00      5.0±0.44µs        ? ?/sec     1.02      5.2±0.27µs        ? ?/sec
run_criteria/yes/006_systems                             1.00     10.9±0.41µs        ? ?/sec     1.08     11.7±0.35µs        ? ?/sec
run_criteria/yes/011_systems                             1.00     16.5±0.57µs        ? ?/sec     1.08     17.9±0.46µs        ? ?/sec
run_criteria/yes/016_systems                             1.00     20.8±0.65µs        ? ?/sec     1.15     24.0±1.05µs        ? ?/sec
run_criteria/yes/021_systems                             1.00     25.5±0.89µs        ? ?/sec     1.16     29.6±0.93µs        ? ?/sec
run_criteria/yes/026_systems                             1.00     31.2±0.86µs        ? ?/sec     1.12     34.8±1.13µs        ? ?/sec
run_criteria/yes/031_systems                             1.00     35.4±0.81µs        ? ?/sec     1.15     40.7±1.94µs        ? ?/sec
run_criteria/yes/036_systems                             1.00     39.8±0.99µs        ? ?/sec     1.17     46.5±1.18µs        ? ?/sec
run_criteria/yes/041_systems                             1.00     44.3±1.34µs        ? ?/sec     1.16     51.4±1.42µs        ? ?/sec
run_criteria/yes/046_systems                             1.00     48.5±1.19µs        ? ?/sec     1.16     56.4±1.58µs        ? ?/sec
run_criteria/yes/051_systems                             1.00     53.3±1.22µs        ? ?/sec     1.17     62.4±1.74µs        ? ?/sec
run_criteria/yes/056_systems                             1.00     58.4±1.18µs        ? ?/sec     1.15     67.4±1.86µs        ? ?/sec
run_criteria/yes/061_systems                             1.00     62.2±1.55µs        ? ?/sec     1.19     73.8±1.29µs        ? ?/sec
run_criteria/yes/066_systems                             1.00     66.1±1.46µs        ? ?/sec     1.17     77.3±1.81µs        ? ?/sec
run_criteria/yes/071_systems                             1.00     70.8±1.57µs        ? ?/sec     1.18     83.4±2.06µs        ? ?/sec
run_criteria/yes/076_systems                             1.00     74.7±1.62µs        ? ?/sec     1.20     90.0±2.14µs        ? ?/sec
run_criteria/yes/081_systems                             1.00     78.6±1.85µs        ? ?/sec     1.23     96.7±2.52µs        ? ?/sec
run_criteria/yes/086_systems                             1.00     83.7±1.91µs        ? ?/sec     1.23    102.8±2.01µs        ? ?/sec
run_criteria/yes/091_systems                             1.00     89.9±5.67µs        ? ?/sec     1.20    108.2±2.42µs        ? ?/sec
run_criteria/yes/096_systems                             1.00     92.3±1.88µs        ? ?/sec     1.24    114.4±5.06µs        ? ?/sec
run_criteria/yes/101_systems                             1.00     96.3±2.08µs        ? ?/sec     1.23    118.7±3.25µs        ? ?/sec
run_criteria/yes_using_query/001_systems                 1.00      4.4±0.25µs        ? ?/sec     1.17      5.1±0.36µs        ? ?/sec
run_criteria/yes_using_query/006_systems                 1.00     10.7±0.38µs        ? ?/sec     1.11     12.0±0.53µs        ? ?/sec
run_criteria/yes_using_query/011_systems                 1.00     15.8±0.50µs        ? ?/sec     1.16     18.4±0.91µs        ? ?/sec
run_criteria/yes_using_query/016_systems                 1.00     20.2±0.78µs        ? ?/sec     1.18     23.9±0.62µs        ? ?/sec
run_criteria/yes_using_query/021_systems                 1.00     25.7±0.84µs        ? ?/sec     1.19     30.6±0.71µs        ? ?/sec
run_criteria/yes_using_query/026_systems                 1.00     30.9±0.86µs        ? ?/sec     1.16     35.9±1.38µs        ? ?/sec
run_criteria/yes_using_query/031_systems                 1.00     36.2±1.22µs        ? ?/sec     1.15     41.6±1.08µs        ? ?/sec
run_criteria/yes_using_query/036_systems                 1.00     40.0±0.90µs        ? ?/sec     1.17     46.6±1.52µs        ? ?/sec
run_criteria/yes_using_query/041_systems                 1.00     44.3±1.44µs        ? ?/sec     1.17     51.8±1.25µs        ? ?/sec
run_criteria/yes_using_query/046_systems                 1.00     47.8±0.93µs        ? ?/sec     1.20     57.6±1.28µs        ? ?/sec
run_criteria/yes_using_query/051_systems                 1.00     52.3±1.14µs        ? ?/sec     1.21     63.3±1.61µs        ? ?/sec
run_criteria/yes_using_query/056_systems                 1.00     56.3±1.28µs        ? ?/sec     1.25     70.3±2.75µs        ? ?/sec
run_criteria/yes_using_query/061_systems                 1.00     60.0±1.52µs        ? ?/sec     1.25     75.1±1.97µs        ? ?/sec
run_criteria/yes_using_query/066_systems                 1.00     65.8±3.44µs        ? ?/sec     1.23     81.0±2.21µs        ? ?/sec
run_criteria/yes_using_query/071_systems                 1.00     69.1±1.98µs        ? ?/sec     1.26     86.9±2.44µs        ? ?/sec
run_criteria/yes_using_query/076_systems                 1.00     72.6±2.10µs        ? ?/sec     1.30     94.1±2.17µs        ? ?/sec
run_criteria/yes_using_query/081_systems                 1.00     78.6±2.12µs        ? ?/sec     1.28    101.0±2.62µs        ? ?/sec
run_criteria/yes_using_query/086_systems                 1.00     83.5±2.75µs        ? ?/sec     1.27    106.2±2.54µs        ? ?/sec
run_criteria/yes_using_query/091_systems                 1.00     87.8±2.17µs        ? ?/sec     1.27    111.6±3.24µs        ? ?/sec
run_criteria/yes_using_query/096_systems                 1.00     93.2±2.68µs        ? ?/sec     1.28    119.4±3.33µs        ? ?/sec
run_criteria/yes_using_query/101_systems                 1.00     98.3±3.59µs        ? ?/sec     1.27    125.2±3.00µs        ? ?/sec
run_criteria/yes_using_resource/001_systems              1.00      4.8±0.24µs        ? ?/sec     1.06      5.1±0.36µs        ? ?/sec
run_criteria/yes_using_resource/006_systems              1.00     11.2±0.43µs        ? ?/sec     1.05     11.8±0.54µs        ? ?/sec
run_criteria/yes_using_resource/011_systems              1.00     16.8±0.74µs        ? ?/sec     1.03     17.3±0.56µs        ? ?/sec
run_criteria/yes_using_resource/016_systems              1.00     23.4±0.87µs        ? ?/sec     1.03     24.2±1.02µs        ? ?/sec
run_criteria/yes_using_resource/021_systems              1.00     28.4±0.66µs        ? ?/sec     1.06     30.1±0.75µs        ? ?/sec
run_criteria/yes_using_resource/026_systems              1.00     33.9±0.93µs        ? ?/sec     1.04     35.3±0.86µs        ? ?/sec
run_criteria/yes_using_resource/031_systems              1.00     40.6±1.07µs        ? ?/sec     1.01     41.2±1.21µs        ? ?/sec
run_criteria/yes_using_resource/036_systems              1.00     45.4±0.91µs        ? ?/sec     1.01     45.8±0.98µs        ? ?/sec
run_criteria/yes_using_resource/041_systems              1.00     50.4±1.10µs        ? ?/sec     1.05     52.6±1.19µs        ? ?/sec
run_criteria/yes_using_resource/046_systems              1.00     55.2±1.10µs        ? ?/sec     1.05     57.9±1.29µs        ? ?/sec
run_criteria/yes_using_resource/051_systems              1.00     60.9±1.58µs        ? ?/sec     1.06     64.4±1.65µs        ? ?/sec
run_criteria/yes_using_resource/056_systems              1.00     66.0±1.37µs        ? ?/sec     1.06     69.7±2.26µs        ? ?/sec
run_criteria/yes_using_resource/061_systems              1.00     70.2±1.45µs        ? ?/sec     1.07     75.3±1.98µs        ? ?/sec
run_criteria/yes_using_resource/066_systems              1.00     76.3±2.25µs        ? ?/sec     1.05     80.0±1.88µs        ? ?/sec
run_criteria/yes_using_resource/071_systems              1.00     82.3±2.94µs        ? ?/sec     1.05     86.5±2.88µs        ? ?/sec
run_criteria/yes_using_resource/076_systems              1.00     87.4±1.96µs        ? ?/sec     1.06     92.6±2.30µs        ? ?/sec
run_criteria/yes_using_resource/081_systems              1.00     92.3±2.21µs        ? ?/sec     1.08     99.3±2.33µs        ? ?/sec
run_criteria/yes_using_resource/086_systems              1.00     98.2±2.59µs        ? ?/sec     1.07    105.3±2.34µs        ? ?/sec
run_criteria/yes_using_resource/091_systems              1.00    103.1±2.40µs        ? ?/sec     1.09    112.1±2.76µs        ? ?/sec
run_criteria/yes_using_resource/096_systems              1.00    111.3±4.37µs        ? ?/sec     1.06    117.6±2.74µs        ? ?/sec
run_criteria/yes_using_resource/101_systems              1.00    115.2±2.35µs        ? ?/sec     1.07    123.0±2.90µs        ? ?/sec
run_criteria/yes_with_labels/001_systems                 1.06      5.2±0.32µs        ? ?/sec     1.00      4.8±0.29µs        ? ?/sec
run_criteria/yes_with_labels/006_systems                 1.10     12.0±0.57µs        ? ?/sec     1.00     10.8±0.33µs        ? ?/sec
run_criteria/yes_with_labels/011_systems                 1.13     18.2±0.70µs        ? ?/sec     1.00     16.1±0.62µs        ? ?/sec
run_criteria/yes_with_labels/016_systems                 1.13     24.4±0.78µs        ? ?/sec     1.00     21.5±0.59µs        ? ?/sec
run_criteria/yes_with_labels/021_systems                 1.11     29.5±0.98µs        ? ?/sec     1.00     26.5±0.79µs        ? ?/sec
run_criteria/yes_with_labels/026_systems                 1.14     35.7±0.80µs        ? ?/sec     1.00     31.2±0.77µs        ? ?/sec
run_criteria/yes_with_labels/031_systems                 1.17     41.1±1.00µs        ? ?/sec     1.00     35.2±0.88µs        ? ?/sec
run_criteria/yes_with_labels/036_systems                 1.17     46.7±0.98µs        ? ?/sec     1.00     40.0±1.32µs        ? ?/sec
run_criteria/yes_with_labels/041_systems                 1.14     52.0±1.63µs        ? ?/sec     1.00     45.4±1.16µs        ? ?/sec
run_criteria/yes_with_labels/046_systems                 1.20     57.9±1.35µs        ? ?/sec     1.00     48.2±1.12µs        ? ?/sec
run_criteria/yes_with_labels/051_systems                 1.18     63.7±1.60µs        ? ?/sec     1.00     54.2±1.13µs        ? ?/sec
run_criteria/yes_with_labels/056_systems                 1.21     69.0±1.83µs        ? ?/sec     1.00     57.1±1.43µs        ? ?/sec
run_criteria/yes_with_labels/061_systems                 1.19     74.4±1.62µs        ? ?/sec     1.00     62.5±1.31µs        ? ?/sec
run_criteria/yes_with_labels/066_systems                 1.20     80.3±2.37µs        ? ?/sec     1.00     66.8±1.50µs        ? ?/sec
run_criteria/yes_with_labels/071_systems                 1.18     85.5±1.68µs        ? ?/sec     1.00     72.2±2.67µs        ? ?/sec
run_criteria/yes_with_labels/076_systems                 1.20     91.6±1.80µs        ? ?/sec     1.00     76.2±2.12µs        ? ?/sec
run_criteria/yes_with_labels/081_systems                 1.21     98.5±1.75µs        ? ?/sec     1.00     81.3±1.98µs        ? ?/sec
run_criteria/yes_with_labels/086_systems                 1.21    103.5±2.95µs        ? ?/sec     1.00     85.4±2.58µs        ? ?/sec
run_criteria/yes_with_labels/091_systems                 1.23    108.8±2.64µs        ? ?/sec     1.00     88.4±2.51µs        ? ?/sec
run_criteria/yes_with_labels/096_systems                 1.22    114.8±2.81µs        ? ?/sec     1.00     94.0±3.65µs        ? ?/sec
run_criteria/yes_with_labels/101_systems                 1.23    121.4±3.32µs        ? ?/sec     1.00     98.6±2.37µs        ? ?/sec
schedule/base                                            1.33     41.2±2.72µs        ? ?/sec     1.00     30.8±2.64µs        ? ?/sec
simple_insert/base                                       1.00  615.2±104.83µs        ? ?/sec     1.00  616.8±107.65µs        ? ?/sec
simple_insert/unbatched                                  1.02  1401.4±115.31µs        ? ?/sec    1.00  1367.2±80.74µs        ? ?/sec
simple_iter/base                                         1.01     13.8±0.59µs        ? ?/sec     1.00     13.7±0.37µs        ? ?/sec
simple_iter/foreach                                      1.00     11.0±0.07µs        ? ?/sec     1.00     10.9±0.10µs        ? ?/sec
simple_iter/sparse                                       1.01     55.1±0.89µs        ? ?/sec     1.00     54.4±0.85µs        ? ?/sec
simple_iter/sparse_foreach                               1.00     41.9±0.85µs        ? ?/sec     1.04     43.8±2.69µs        ? ?/sec
simple_iter/system                                       1.01     13.8±0.22µs        ? ?/sec     1.00     13.6±0.12µs        ? ?/sec
sized_commands_0_bytes/2000_commands                     1.14      5.1±0.09µs        ? ?/sec     1.00      4.5±0.04µs        ? ?/sec
sized_commands_0_bytes/4000_commands                     1.16     10.5±0.22µs        ? ?/sec     1.00      9.0±0.03µs        ? ?/sec
sized_commands_0_bytes/6000_commands                     1.15     15.6±0.62µs        ? ?/sec     1.00     13.6±0.11µs        ? ?/sec
sized_commands_0_bytes/8000_commands                     1.14     20.8±0.32µs        ? ?/sec     1.00     18.2±0.22µs        ? ?/sec
sized_commands_12_bytes/2000_commands                    1.00      7.2±0.21µs        ? ?/sec     1.01      7.3±0.03µs        ? ?/sec
sized_commands_12_bytes/4000_commands                    1.00     14.4±0.31µs        ? ?/sec     1.01     14.5±0.08µs        ? ?/sec
sized_commands_12_bytes/6000_commands                    1.02     22.2±0.47µs        ? ?/sec     1.00     21.7±0.09µs        ? ?/sec
sized_commands_12_bytes/8000_commands                    1.01     29.3±0.43µs        ? ?/sec     1.00     29.0±0.25µs        ? ?/sec
sized_commands_512_bytes/2000_commands                   1.00    140.6±5.93µs        ? ?/sec     1.17    164.4±5.20µs        ? ?/sec
sized_commands_512_bytes/4000_commands                   1.00   290.6±38.56µs        ? ?/sec     1.16   335.7±22.85µs        ? ?/sec
sized_commands_512_bytes/6000_commands                   1.00   443.9±65.41µs        ? ?/sec     1.16   515.2±60.79µs        ? ?/sec
sized_commands_512_bytes/8000_commands                   1.00   589.1±70.73µs        ? ?/sec     1.16   682.4±73.22µs        ? ?/sec
sparse_fragmented_iter/base                              1.00     11.4±0.49ns        ? ?/sec     1.10     12.5±0.76ns        ? ?/sec
sparse_fragmented_iter/foreach                           1.01      8.8±0.42ns        ? ?/sec     1.00      8.7±0.35ns        ? ?/sec
spawn_commands/2000_entities                             1.00   260.6±26.12µs        ? ?/sec     1.03   269.6±26.87µs        ? ?/sec
spawn_commands/4000_entities                             1.00   531.2±54.28µs        ? ?/sec     1.01   535.3±46.75µs        ? ?/sec
spawn_commands/6000_entities                             1.00   784.5±78.80µs        ? ?/sec     1.00   782.7±70.84µs        ? ?/sec
spawn_commands/8000_entities                             1.00  1024.7±134.61µs        ? ?/sec    1.00  1020.1±109.07µs        ? ?/sec
world_entity/50000_entities                              1.00    176.2±7.10µs        ? ?/sec     2.42    426.0±2.68µs        ? ?/sec
world_get/50000_entities_sparse                          1.00   448.5±32.68µs        ? ?/sec     1.25   560.1±28.52µs        ? ?/sec
world_get/50000_entities_table                           1.00   451.5±29.13µs        ? ?/sec     1.96    883.3±5.88µs        ? ?/sec
world_query_for_each/50000_entities_sparse               1.03     85.7±8.92µs        ? ?/sec     1.00     83.3±2.52µs        ? ?/sec
world_query_for_each/50000_entities_table                1.00     27.4±0.37µs        ? ?/sec     1.00     27.4±0.40µs        ? ?/sec
world_query_get/50000_entities_sparse                    1.01   392.8±17.64µs        ? ?/sec     1.00   388.2±13.99µs        ? ?/sec
world_query_get/50000_entities_table                     1.00   279.0±10.96µs        ? ?/sec     1.00   278.4±12.11µs        ? ?/sec
world_query_iter/50000_entities_sparse                   1.11     97.3±3.46µs        ? ?/sec     1.00     87.7±2.42µs        ? ?/sec
world_query_iter/50000_entities_table                    1.33    37.0±10.98µs        ? ?/sec     1.00     27.8±1.17µs        ? ?/sec

@james7132 james7132 added S-Blocked This cannot move forward until something else changes and removed S-Needs-Benchmarking This set of changes needs performance benchmarking to double-check that they help labels Jun 1, 2022
@james7132 james7132 removed the S-Blocked This cannot move forward until something else changes label Nov 2, 2022
@alice-i-cecile alice-i-cecile modified the milestone: Bevy 0.9 Nov 2, 2022
@alice-i-cecile
Copy link
Member

@james7132 wanna try another round of benchmarks?

@alice-i-cecile alice-i-cecile added the S-Needs-Benchmarking This set of changes needs performance benchmarking to double-check that they help label Nov 2, 2022
@james7132
Copy link
Member Author

james7132 commented Nov 2, 2022

Done with a set of microbenchmarks relative to the current main. Most of the prior regressions have become slight improvements, or are within the noise threshold at this point. However, there are a few outstanding regressions that have gotten noticeably larger. I'll see if I can smooth these out.

group                                                    archetype-row-u32                        main
-----                                                    -----------------                        ----
add_remove/sparse_set                                    1.00  1108.6±70.58µs        ? ?/sec      1.03  1143.2±68.64µs        ? ?/sec
add_remove/table                                         1.00  1442.2±11.86µs        ? ?/sec      1.02  1476.0±32.74µs        ? ?/sec
add_remove_big/sparse_set                                1.00  1416.5±368.81µs        ? ?/sec     1.04  1474.9±364.20µs        ? ?/sec
add_remove_big/table                                     1.00      2.7±0.04ms        ? ?/sec      1.03      2.7±0.03ms        ? ?/sec
added_archetypes/archetype_count/100                     1.00   187.2±11.71µs        ? ?/sec      1.04    194.2±7.75µs        ? ?/sec
added_archetypes/archetype_count/1000                    1.00    641.8±7.19µs        ? ?/sec      1.01    647.2±5.30µs        ? ?/sec
added_archetypes/archetype_count/10000                   1.00      9.7±0.70ms        ? ?/sec      1.01      9.8±0.57ms        ? ?/sec
added_archetypes/archetype_count/200                     1.00   251.4±11.54µs        ? ?/sec      1.05   264.7±13.07µs        ? ?/sec
added_archetypes/archetype_count/2000                    1.00  1275.8±10.75µs        ? ?/sec      1.01  1290.3±29.91µs        ? ?/sec
added_archetypes/archetype_count/500                     1.00   370.3±16.90µs        ? ?/sec      1.09   405.4±46.12µs        ? ?/sec
added_archetypes/archetype_count/5000                    1.01      3.5±0.16ms        ? ?/sec      1.00      3.4±0.24ms        ? ?/sec
busy_systems/01x_entities_03_systems                     1.12     43.4±2.04µs        ? ?/sec      1.00     38.8±1.61µs        ? ?/sec
busy_systems/01x_entities_06_systems                     1.02     74.7±2.77µs        ? ?/sec      1.00     73.5±3.86µs        ? ?/sec
busy_systems/01x_entities_09_systems                     1.01    118.6±5.34µs        ? ?/sec      1.00    117.8±4.30µs        ? ?/sec
busy_systems/01x_entities_12_systems                     1.19    159.8±4.27µs        ? ?/sec      1.00    134.4±4.81µs        ? ?/sec
busy_systems/01x_entities_15_systems                     1.00    173.7±4.56µs        ? ?/sec      1.00    173.5±3.38µs        ? ?/sec
busy_systems/02x_entities_03_systems                     1.00     74.4±3.84µs        ? ?/sec      1.00     74.1±3.67µs        ? ?/sec
busy_systems/02x_entities_06_systems                     1.00    127.7±5.54µs        ? ?/sec      1.16    147.7±4.09µs        ? ?/sec
busy_systems/02x_entities_09_systems                     1.00    194.8±7.03µs        ? ?/sec      1.09    211.9±9.11µs        ? ?/sec
busy_systems/02x_entities_12_systems                     1.08    273.2±9.67µs        ? ?/sec      1.00    252.6±9.74µs        ? ?/sec
busy_systems/02x_entities_15_systems                     1.01   317.3±11.42µs        ? ?/sec      1.00   312.8±16.54µs        ? ?/sec
busy_systems/03x_entities_03_systems                     1.04     98.5±4.87µs        ? ?/sec      1.00     94.4±5.13µs        ? ?/sec
busy_systems/03x_entities_06_systems                     1.00   189.0±10.55µs        ? ?/sec      1.09   206.0±11.14µs        ? ?/sec
busy_systems/03x_entities_09_systems                     1.04   325.3±15.91µs        ? ?/sec      1.00   312.6±15.51µs        ? ?/sec
busy_systems/03x_entities_12_systems                     1.07   384.9±12.29µs        ? ?/sec      1.00    359.0±8.81µs        ? ?/sec
busy_systems/03x_entities_15_systems                     1.00   466.8±14.09µs        ? ?/sec      1.12   521.1±21.39µs        ? ?/sec
busy_systems/04x_entities_03_systems                     1.02    132.3±6.00µs        ? ?/sec      1.00    130.2±7.16µs        ? ?/sec
busy_systems/04x_entities_06_systems                     1.14   265.6±12.83µs        ? ?/sec      1.00   232.7±12.83µs        ? ?/sec
busy_systems/04x_entities_09_systems                     1.00   447.1±25.97µs        ? ?/sec      1.02   454.2±23.59µs        ? ?/sec
busy_systems/04x_entities_12_systems                     1.00   441.4±11.22µs        ? ?/sec      1.15   509.3±22.51µs        ? ?/sec
busy_systems/04x_entities_15_systems                     1.00   614.6±29.38µs        ? ?/sec      1.02   624.1±23.46µs        ? ?/sec
busy_systems/05x_entities_03_systems                     1.13    170.7±6.64µs        ? ?/sec      1.00   150.7±11.80µs        ? ?/sec
busy_systems/05x_entities_06_systems                     1.12   359.9±20.04µs        ? ?/sec      1.00   321.2±16.92µs        ? ?/sec
busy_systems/05x_entities_09_systems                     1.03   512.9±23.30µs        ? ?/sec      1.00   498.4±26.35µs        ? ?/sec
busy_systems/05x_entities_12_systems                     1.12   723.7±23.21µs        ? ?/sec      1.00   645.6±33.48µs        ? ?/sec
busy_systems/05x_entities_15_systems                     1.00   812.9±39.57µs        ? ?/sec      1.08   874.2±35.10µs        ? ?/sec
contrived/01x_entities_03_systems                        1.11     25.6±1.14µs        ? ?/sec      1.00     23.2±0.59µs        ? ?/sec
contrived/01x_entities_06_systems                        1.00     47.9±0.79µs        ? ?/sec      1.03     49.1±0.78µs        ? ?/sec
contrived/01x_entities_09_systems                        1.00     67.3±1.12µs        ? ?/sec      1.05     70.5±1.78µs        ? ?/sec
contrived/01x_entities_12_systems                        1.00     90.3±1.77µs        ? ?/sec      1.02     92.0±2.02µs        ? ?/sec
contrived/01x_entities_15_systems                        1.00    114.5±1.96µs        ? ?/sec      1.02    117.0±2.10µs        ? ?/sec
contrived/02x_entities_03_systems                        1.00     41.4±1.29µs        ? ?/sec      1.01     41.8±0.76µs        ? ?/sec
contrived/02x_entities_06_systems                        1.03     80.6±1.53µs        ? ?/sec      1.00     78.0±1.50µs        ? ?/sec
contrived/02x_entities_09_systems                        1.06    112.9±2.65µs        ? ?/sec      1.00    106.2±3.52µs        ? ?/sec
contrived/02x_entities_12_systems                        1.03    151.1±2.98µs        ? ?/sec      1.00    147.0±3.65µs        ? ?/sec
contrived/02x_entities_15_systems                        1.03    184.4±3.02µs        ? ?/sec      1.00    178.4±3.03µs        ? ?/sec
contrived/03x_entities_03_systems                        1.01     57.1±2.46µs        ? ?/sec      1.00     56.3±1.38µs        ? ?/sec
contrived/03x_entities_06_systems                        1.00     97.4±2.95µs        ? ?/sec      1.06    103.4±2.84µs        ? ?/sec
contrived/03x_entities_09_systems                        1.00    145.1±3.46µs        ? ?/sec      1.07    154.7±4.09µs        ? ?/sec
contrived/03x_entities_12_systems                        1.00    192.3±3.77µs        ? ?/sec      1.00    193.2±3.65µs        ? ?/sec
contrived/03x_entities_15_systems                        1.01    242.5±5.34µs        ? ?/sec      1.00    240.6±5.64µs        ? ?/sec
contrived/04x_entities_03_systems                        1.00     61.9±3.61µs        ? ?/sec      1.16     71.7±1.37µs        ? ?/sec
contrived/04x_entities_06_systems                        1.00    131.5±3.76µs        ? ?/sec      1.03    135.4±3.00µs        ? ?/sec
contrived/04x_entities_09_systems                        1.00    187.7±3.12µs        ? ?/sec      1.03    193.1±3.60µs        ? ?/sec
contrived/04x_entities_12_systems                        1.04    242.3±5.60µs        ? ?/sec      1.00    232.9±5.14µs        ? ?/sec
contrived/04x_entities_15_systems                        1.00    286.8±4.90µs        ? ?/sec      1.05    301.3±5.79µs        ? ?/sec
contrived/05x_entities_03_systems                        1.02     86.1±2.30µs        ? ?/sec      1.00     84.3±2.42µs        ? ?/sec
contrived/05x_entities_06_systems                        1.12    163.9±8.81µs        ? ?/sec      1.00    146.3±2.31µs        ? ?/sec
contrived/05x_entities_09_systems                        1.00    209.3±4.90µs        ? ?/sec      1.08    226.5±5.13µs        ? ?/sec
contrived/05x_entities_12_systems                        1.00    272.5±6.97µs        ? ?/sec      1.00    272.3±4.63µs        ? ?/sec
contrived/05x_entities_15_systems                        1.05    358.5±9.92µs        ? ?/sec      1.00    342.3±6.17µs        ? ?/sec
empty_commands/0_entities                                1.00      5.2±0.02ns        ? ?/sec      1.00      5.2±0.02ns        ? ?/sec
empty_systems/000_systems                                1.00     68.9±0.09ns        ? ?/sec      1.02     70.1±8.50ns        ? ?/sec
empty_systems/001_systems                                1.04      4.0±0.32µs        ? ?/sec      1.00      3.8±0.18µs        ? ?/sec
empty_systems/002_systems                                1.00      4.7±0.09µs        ? ?/sec      1.05      4.9±0.15µs        ? ?/sec
empty_systems/003_systems                                1.00      6.0±0.07µs        ? ?/sec      1.06      6.4±0.13µs        ? ?/sec
empty_systems/004_systems                                1.05      7.7±0.09µs        ? ?/sec      1.00      7.3±0.13µs        ? ?/sec
empty_systems/005_systems                                1.02      8.0±0.18µs        ? ?/sec      1.00      7.8±0.17µs        ? ?/sec
empty_systems/010_systems                                1.00     12.5±0.47µs        ? ?/sec      1.00     12.5±0.58µs        ? ?/sec
empty_systems/015_systems                                1.00     17.8±0.54µs        ? ?/sec      1.01     18.0±0.94µs        ? ?/sec
empty_systems/020_systems                                1.00     23.1±0.63µs        ? ?/sec      1.00     23.1±0.86µs        ? ?/sec
empty_systems/025_systems                                1.00     27.2±0.66µs        ? ?/sec      1.02     27.9±0.99µs        ? ?/sec
empty_systems/030_systems                                1.00     32.1±1.12µs        ? ?/sec      1.03     33.2±1.22µs        ? ?/sec
empty_systems/035_systems                                1.00     36.4±0.91µs        ? ?/sec      1.05     38.4±0.85µs        ? ?/sec
empty_systems/040_systems                                1.00     41.6±0.77µs        ? ?/sec      1.04     43.2±0.98µs        ? ?/sec
empty_systems/045_systems                                1.00     46.2±1.08µs        ? ?/sec      1.04     48.1±1.22µs        ? ?/sec
empty_systems/050_systems                                1.00     50.0±2.46µs        ? ?/sec      1.05     52.3±1.49µs        ? ?/sec
empty_systems/055_systems                                1.00     55.0±1.61µs        ? ?/sec      1.05     57.8±1.78µs        ? ?/sec
empty_systems/060_systems                                1.00     61.0±1.77µs        ? ?/sec      1.04     63.3±1.77µs        ? ?/sec
empty_systems/065_systems                                1.00     63.7±2.55µs        ? ?/sec      1.06     67.8±2.19µs        ? ?/sec
empty_systems/070_systems                                1.00     70.9±2.40µs        ? ?/sec      1.00     71.2±2.28µs        ? ?/sec
empty_systems/075_systems                                1.00     76.0±2.53µs        ? ?/sec      1.02     77.3±3.05µs        ? ?/sec
empty_systems/080_systems                                1.01     82.1±2.64µs        ? ?/sec      1.00     81.1±3.11µs        ? ?/sec
empty_systems/085_systems                                1.00     87.1±3.37µs        ? ?/sec      1.01     88.1±4.33µs        ? ?/sec
empty_systems/090_systems                                1.00     92.8±2.66µs        ? ?/sec      1.01     93.8±3.30µs        ? ?/sec
empty_systems/095_systems                                1.00     97.4±3.37µs        ? ?/sec      1.05    101.9±3.65µs        ? ?/sec
empty_systems/100_systems                                1.00    105.7±3.96µs        ? ?/sec      1.04    110.1±3.46µs        ? ?/sec
fake_commands/2000_commands                              1.00      6.7±0.02µs        ? ?/sec      1.02      6.8±0.02µs        ? ?/sec
fake_commands/4000_commands                              1.00     13.8±0.52µs        ? ?/sec      1.02     14.1±0.05µs        ? ?/sec
fake_commands/6000_commands                              1.00     20.0±0.07µs        ? ?/sec      1.04     20.8±0.13µs        ? ?/sec
fake_commands/8000_commands                              1.00     26.6±0.08µs        ? ?/sec      1.04     27.7±0.18µs        ? ?/sec
get_or_spawn/batched                                     1.00   420.0±21.03µs        ? ?/sec      1.00   419.1±19.06µs        ? ?/sec
get_or_spawn/individual                                  1.00   901.7±76.02µs        ? ?/sec      1.02   920.1±74.20µs        ? ?/sec
heavy_compute/base                                       1.00    355.7±3.54µs        ? ?/sec      1.00    356.0±4.58µs        ? ?/sec
insert_commands/insert                                   1.00   775.8±35.59µs        ? ?/sec      1.02   792.2±31.13µs        ? ?/sec
insert_commands/insert_batch                             1.00   409.1±22.27µs        ? ?/sec      1.02   418.0±22.03µs        ? ?/sec
insert_simple/base                                       1.03    568.7±6.59µs        ? ?/sec      1.00    554.0±5.57µs        ? ?/sec
insert_simple/unbatched                                  1.00  1237.8±16.13µs        ? ?/sec      1.02  1256.7±35.97µs        ? ?/sec
iter_fragmented/base                                     1.00    337.3±4.40ns        ? ?/sec      1.02    343.5±4.18ns        ? ?/sec
iter_fragmented/foreach                                  1.00   236.5±18.47ns        ? ?/sec      1.07   253.8±30.25ns        ? ?/sec
iter_fragmented/foreach_wide                             1.00      4.0±0.19µs        ? ?/sec      1.06      4.2±0.28µs        ? ?/sec
iter_fragmented/wide                                     1.00      4.6±0.23µs        ? ?/sec      1.00      4.6±0.17µs        ? ?/sec
iter_fragmented_sparse/base                              1.00      8.7±0.47ns        ? ?/sec      1.00      8.7±0.25ns        ? ?/sec
iter_fragmented_sparse/foreach                           1.00      9.5±0.93ns        ? ?/sec      1.00      9.5±0.42ns        ? ?/sec
iter_fragmented_sparse/foreach_wide                      1.00     42.0±0.87ns        ? ?/sec      1.02     42.8±5.09ns        ? ?/sec
iter_fragmented_sparse/wide                              1.00     51.9±0.20ns        ? ?/sec      1.02     53.0±7.44ns        ? ?/sec
iter_simple/base                                         1.00     11.0±0.04µs        ? ?/sec      1.00     11.0±0.04µs        ? ?/sec
iter_simple/foreach                                      1.00     10.8±0.04µs        ? ?/sec      1.00     10.9±0.01µs        ? ?/sec
iter_simple/foreach_sparse_set                           1.00     41.8±0.12µs        ? ?/sec      1.01     42.4±0.16µs        ? ?/sec
iter_simple/foreach_wide                                 1.00     43.5±0.21µs        ? ?/sec      1.01     43.9±0.18µs        ? ?/sec
iter_simple/foreach_wide_sparse_set                      1.00    232.3±1.36µs        ? ?/sec      1.01    234.1±1.02µs        ? ?/sec
iter_simple/sparse_set                                   1.00     49.8±0.28µs        ? ?/sec      1.02     50.6±1.77µs        ? ?/sec
iter_simple/system                                       1.00     10.9±0.01µs        ? ?/sec      1.01     11.1±0.06µs        ? ?/sec
iter_simple/wide                                         1.00     57.6±1.57µs        ? ?/sec      1.01     58.1±0.40µs        ? ?/sec
iter_simple/wide_sparse_set                              1.00    243.9±3.79µs        ? ?/sec      1.00    244.6±0.88µs        ? ?/sec
no_archetypes/system_count/0                             1.00     68.9±0.28ns        ? ?/sec      1.00     68.7±0.12ns        ? ?/sec
no_archetypes/system_count/100                           1.00    102.4±3.23µs        ? ?/sec      1.01    103.5±4.33µs        ? ?/sec
no_archetypes/system_count/20                            1.01     22.3±0.78µs        ? ?/sec      1.00     22.2±0.78µs        ? ?/sec
no_archetypes/system_count/40                            1.01     40.6±0.92µs        ? ?/sec      1.00     40.3±1.69µs        ? ?/sec
no_archetypes/system_count/60                            1.00     59.5±1.91µs        ? ?/sec      1.02     60.5±2.27µs        ? ?/sec
no_archetypes/system_count/80                            1.00     76.0±4.10µs        ? ?/sec      1.04     79.2±3.18µs        ? ?/sec
query_get/50000_entities_sparse                          1.00   716.3±40.28µs        ? ?/sec      1.00    717.4±8.31µs        ? ?/sec
query_get/50000_entities_table                           1.16    598.3±3.59µs        ? ?/sec      1.00    515.2±4.91µs        ? ?/sec
query_get_component/50000_entities_sparse                1.00  1226.4±32.31µs        ? ?/sec      1.00  1222.4±13.73µs        ? ?/sec
query_get_component/50000_entities_table                 1.02  1266.7±63.79µs        ? ?/sec      1.00  1240.7±10.43µs        ? ?/sec
query_get_component_simple/system                        1.26  950.0±355.86µs        ? ?/sec      1.00   756.0±19.31µs        ? ?/sec
query_get_component_simple/unchecked                     1.00   979.4±35.04µs        ? ?/sec      1.00    980.2±8.22µs        ? ?/sec
query_get_many_10/50000_calls_sparse                     1.00      7.3±0.37ms        ? ?/sec      1.05      7.7±0.60ms        ? ?/sec
query_get_many_10/50000_calls_table                      1.00      6.4±0.20ms        ? ?/sec      1.00      6.4±0.32ms        ? ?/sec
query_get_many_2/50000_calls_sparse                      1.00   1724.6±8.43µs        ? ?/sec      1.00   1726.5±9.07µs        ? ?/sec
query_get_many_2/50000_calls_table                       1.01   1678.4±7.83µs        ? ?/sec      1.00  1658.3±62.53µs        ? ?/sec
query_get_many_5/50000_calls_sparse                      1.01      4.0±0.08ms        ? ?/sec      1.00      4.0±0.04ms        ? ?/sec
query_get_many_5/50000_calls_table                       1.01      3.5±0.14ms        ? ?/sec      1.00      3.5±0.15ms        ? ?/sec
run_criteria/no/001_systems                              1.00     90.7±0.34ns        ? ?/sec      1.01     91.7±0.35ns        ? ?/sec
run_criteria/no/006_systems                              1.00    169.6±0.50ns        ? ?/sec      1.03    174.1±0.55ns        ? ?/sec
run_criteria/no/011_systems                              1.00    250.5±0.48ns        ? ?/sec      1.01    253.6±0.67ns        ? ?/sec
run_criteria/no/016_systems                              1.00    333.8±0.62ns        ? ?/sec      1.04    348.1±1.21ns        ? ?/sec
run_criteria/no/021_systems                              1.00    413.4±0.89ns        ? ?/sec      1.06    437.3±0.88ns        ? ?/sec
run_criteria/no/026_systems                              1.00    498.3±1.49ns        ? ?/sec      1.02    509.6±1.97ns        ? ?/sec
run_criteria/no/031_systems                              1.01    605.9±2.34ns        ? ?/sec      1.00    599.4±1.85ns        ? ?/sec
run_criteria/no/036_systems                              1.01    703.8±1.55ns        ? ?/sec      1.00    700.0±1.42ns        ? ?/sec
run_criteria/no/041_systems                              1.01    804.9±2.28ns        ? ?/sec      1.00    794.2±0.95ns        ? ?/sec
run_criteria/no/046_systems                              1.00    858.8±1.42ns        ? ?/sec      1.03    888.7±4.79ns        ? ?/sec
run_criteria/no/051_systems                              1.00    989.1±1.09ns        ? ?/sec      1.02   1004.2±1.32ns        ? ?/sec
run_criteria/no/056_systems                              1.00   1082.9±2.32ns        ? ?/sec      1.00   1084.7±2.78ns        ? ?/sec
run_criteria/no/061_systems                              1.02   1166.0±2.33ns        ? ?/sec      1.00   1139.7±1.48ns        ? ?/sec
run_criteria/no/066_systems                              1.01   1268.5±1.97ns        ? ?/sec      1.00   1253.3±4.38ns        ? ?/sec
run_criteria/no/071_systems                              1.00   1352.7±2.53ns        ? ?/sec      1.01   1367.8±2.53ns        ? ?/sec
run_criteria/no/076_systems                              1.00   1438.2±2.19ns        ? ?/sec      1.00   1432.5±2.19ns        ? ?/sec
run_criteria/no/081_systems                              1.00   1540.2±1.84ns        ? ?/sec      1.00   1541.1±7.34ns        ? ?/sec
run_criteria/no/086_systems                              1.00   1625.5±3.32ns        ? ?/sec      1.00   1624.3±4.16ns        ? ?/sec
run_criteria/no/091_systems                              1.00   1687.3±5.26ns        ? ?/sec      1.02   1721.6±6.53ns        ? ?/sec
run_criteria/no/096_systems                              1.00   1798.9±2.49ns        ? ?/sec      1.01   1814.6±4.68ns        ? ?/sec
run_criteria/no/101_systems                              1.00   1874.2±2.42ns        ? ?/sec      1.03   1930.2±6.00ns        ? ?/sec
run_criteria/no_with_labels/001_systems                  1.01     92.0±0.26ns        ? ?/sec      1.00     90.8±0.17ns        ? ?/sec
run_criteria/no_with_labels/006_systems                  1.00    151.0±0.32ns        ? ?/sec      1.00    151.5±0.31ns        ? ?/sec
run_criteria/no_with_labels/011_systems                  1.00    210.6±0.35ns        ? ?/sec      1.01    213.2±0.32ns        ? ?/sec
run_criteria/no_with_labels/016_systems                  1.00    268.6±0.46ns        ? ?/sec      1.03    276.5±0.70ns        ? ?/sec
run_criteria/no_with_labels/021_systems                  1.00    327.1±0.79ns        ? ?/sec      1.03    336.8±0.61ns        ? ?/sec
run_criteria/no_with_labels/026_systems                  1.00    390.4±5.64ns        ? ?/sec      1.03    403.3±3.01ns        ? ?/sec
run_criteria/no_with_labels/031_systems                  1.00   453.5±17.85ns        ? ?/sec      1.03    467.7±1.73ns        ? ?/sec
run_criteria/no_with_labels/036_systems                  1.00    516.7±0.63ns        ? ?/sec      1.04    538.9±0.65ns        ? ?/sec
run_criteria/no_with_labels/041_systems                  1.00    585.2±7.10ns        ? ?/sec      1.02    599.2±1.05ns        ? ?/sec
run_criteria/no_with_labels/046_systems                  1.00    638.6±4.34ns        ? ?/sec      1.02    653.6±1.35ns        ? ?/sec
run_criteria/no_with_labels/051_systems                  1.00    690.8±1.48ns        ? ?/sec      1.03    714.8±1.06ns        ? ?/sec
run_criteria/no_with_labels/056_systems                  1.00    762.1±1.85ns        ? ?/sec      1.03    781.3±1.69ns        ? ?/sec
run_criteria/no_with_labels/061_systems                  1.00    808.9±1.79ns        ? ?/sec      1.04    845.0±3.15ns        ? ?/sec
run_criteria/no_with_labels/066_systems                  1.00    880.8±2.32ns        ? ?/sec      1.04    916.5±1.52ns        ? ?/sec
run_criteria/no_with_labels/071_systems                  1.00    947.3±1.37ns        ? ?/sec      1.04    983.0±2.29ns        ? ?/sec
run_criteria/no_with_labels/076_systems                  1.00   1008.0±1.28ns        ? ?/sec      1.03   1036.0±1.75ns        ? ?/sec
run_criteria/no_with_labels/081_systems                  1.00   1066.4±2.66ns        ? ?/sec      1.03   1102.9±1.93ns        ? ?/sec
run_criteria/no_with_labels/086_systems                  1.00   1131.1±2.10ns        ? ?/sec      1.04   1170.9±9.17ns        ? ?/sec
run_criteria/no_with_labels/091_systems                  1.00   1186.5±1.16ns        ? ?/sec      1.05   1241.4±2.55ns        ? ?/sec
run_criteria/no_with_labels/096_systems                  1.00   1240.9±1.99ns        ? ?/sec      1.05   1297.9±2.19ns        ? ?/sec
run_criteria/no_with_labels/101_systems                  1.00   1316.5±2.14ns        ? ?/sec      1.03   1361.2±2.45ns        ? ?/sec
run_criteria/yes/001_systems                             1.00      3.6±0.20µs        ? ?/sec      1.03      3.7±0.14µs        ? ?/sec
run_criteria/yes/006_systems                             1.00      8.1±0.18µs        ? ?/sec      1.02      8.2±0.26µs        ? ?/sec
run_criteria/yes/011_systems                             1.00     12.5±0.48µs        ? ?/sec      1.08     13.5±0.46µs        ? ?/sec
run_criteria/yes/016_systems                             1.00     18.0±0.84µs        ? ?/sec      1.02     18.4±0.70µs        ? ?/sec
run_criteria/yes/021_systems                             1.00     22.6±0.99µs        ? ?/sec      1.01     22.8±0.89µs        ? ?/sec
run_criteria/yes/026_systems                             1.00     27.4±1.09µs        ? ?/sec      1.01     27.7±1.12µs        ? ?/sec
run_criteria/yes/031_systems                             1.00     31.1±1.00µs        ? ?/sec      1.02     31.6±1.05µs        ? ?/sec
run_criteria/yes/036_systems                             1.00     35.6±0.92µs        ? ?/sec      1.08     38.3±1.18µs        ? ?/sec
run_criteria/yes/041_systems                             1.00     40.1±1.04µs        ? ?/sec      1.01     40.5±1.63µs        ? ?/sec
run_criteria/yes/046_systems                             1.00     45.2±1.20µs        ? ?/sec      1.01     45.8±1.73µs        ? ?/sec
run_criteria/yes/051_systems                             1.00     49.7±1.68µs        ? ?/sec      1.04     51.6±1.73µs        ? ?/sec
run_criteria/yes/056_systems                             1.00     54.2±1.95µs        ? ?/sec      1.04     56.7±1.33µs        ? ?/sec
run_criteria/yes/061_systems                             1.00     59.7±2.52µs        ? ?/sec      1.03     61.5±2.47µs        ? ?/sec
run_criteria/yes/066_systems                             1.00     65.6±2.49µs        ? ?/sec      1.00     65.8±2.89µs        ? ?/sec
run_criteria/yes/071_systems                             1.00     69.1±2.55µs        ? ?/sec      1.00     68.8±3.52µs        ? ?/sec
run_criteria/yes/076_systems                             1.02     74.0±3.16µs        ? ?/sec      1.00     72.3±3.30µs        ? ?/sec
run_criteria/yes/081_systems                             1.02     79.3±3.13µs        ? ?/sec      1.00     77.6±2.92µs        ? ?/sec
run_criteria/yes/086_systems                             1.00     84.1±3.23µs        ? ?/sec      1.01     85.2±5.21µs        ? ?/sec
run_criteria/yes/091_systems                             1.04     93.4±3.94µs        ? ?/sec      1.00     90.2±3.43µs        ? ?/sec
run_criteria/yes/096_systems                             1.01    100.7±3.78µs        ? ?/sec      1.00     99.9±4.86µs        ? ?/sec
run_criteria/yes/101_systems                             1.01    108.3±3.40µs        ? ?/sec      1.00    107.4±4.58µs        ? ?/sec
run_criteria/yes_using_query/001_systems                 1.00      3.7±0.13µs        ? ?/sec      1.10      4.0±0.14µs        ? ?/sec
run_criteria/yes_using_query/006_systems                 1.00      8.9±0.21µs        ? ?/sec      1.04      9.2±0.21µs        ? ?/sec
run_criteria/yes_using_query/011_systems                 1.00     13.3±0.46µs        ? ?/sec      1.06     14.1±0.34µs        ? ?/sec
run_criteria/yes_using_query/016_systems                 1.00     18.1±1.16µs        ? ?/sec      1.04     18.8±0.54µs        ? ?/sec
run_criteria/yes_using_query/021_systems                 1.00     22.4±0.88µs        ? ?/sec      1.07     24.1±0.73µs        ? ?/sec
run_criteria/yes_using_query/026_systems                 1.00     27.7±1.02µs        ? ?/sec      1.01     27.9±0.74µs        ? ?/sec
run_criteria/yes_using_query/031_systems                 1.00     32.0±1.20µs        ? ?/sec      1.03     33.1±0.87µs        ? ?/sec
run_criteria/yes_using_query/036_systems                 1.00     36.1±1.06µs        ? ?/sec      1.04     37.7±1.16µs        ? ?/sec
run_criteria/yes_using_query/041_systems                 1.00     40.4±1.18µs        ? ?/sec      1.03     41.5±1.09µs        ? ?/sec
run_criteria/yes_using_query/046_systems                 1.00     44.1±1.27µs        ? ?/sec      1.07     47.1±1.11µs        ? ?/sec
run_criteria/yes_using_query/051_systems                 1.00     49.7±1.53µs        ? ?/sec      1.03     51.0±1.46µs        ? ?/sec
run_criteria/yes_using_query/056_systems                 1.00     55.3±1.87µs        ? ?/sec      1.00     55.5±2.41µs        ? ?/sec
run_criteria/yes_using_query/061_systems                 1.00     59.7±2.78µs        ? ?/sec      1.02     60.7±2.68µs        ? ?/sec
run_criteria/yes_using_query/066_systems                 1.00     65.4±2.25µs        ? ?/sec      1.00     65.6±3.70µs        ? ?/sec
run_criteria/yes_using_query/071_systems                 1.00     70.3±3.12µs        ? ?/sec      1.00     70.5±2.85µs        ? ?/sec
run_criteria/yes_using_query/076_systems                 1.00     74.5±3.92µs        ? ?/sec      1.03     76.4±2.95µs        ? ?/sec
run_criteria/yes_using_query/081_systems                 1.00     79.5±3.45µs        ? ?/sec      1.01     80.2±3.78µs        ? ?/sec
run_criteria/yes_using_query/086_systems                 1.00     87.0±3.92µs        ? ?/sec      1.01     88.3±4.20µs        ? ?/sec
run_criteria/yes_using_query/091_systems                 1.01     94.2±4.08µs        ? ?/sec      1.00     93.7±3.65µs        ? ?/sec
run_criteria/yes_using_query/096_systems                 1.00     99.0±3.33µs        ? ?/sec      1.02    100.6±4.79µs        ? ?/sec
run_criteria/yes_using_query/101_systems                 1.00    107.3±3.36µs        ? ?/sec      1.02    109.1±6.21µs        ? ?/sec
run_criteria/yes_using_resource/001_systems              1.00      3.8±0.14µs        ? ?/sec      1.03      3.9±0.10µs        ? ?/sec
run_criteria/yes_using_resource/006_systems              1.00      8.2±0.20µs        ? ?/sec      1.09      9.0±0.23µs        ? ?/sec
run_criteria/yes_using_resource/011_systems              1.00     12.8±0.48µs        ? ?/sec      1.07     13.7±0.48µs        ? ?/sec
run_criteria/yes_using_resource/016_systems              1.00     18.6±0.76µs        ? ?/sec      1.00     18.6±0.63µs        ? ?/sec
run_criteria/yes_using_resource/021_systems              1.00     23.4±0.76µs        ? ?/sec      1.01     23.6±0.77µs        ? ?/sec
run_criteria/yes_using_resource/026_systems              1.02     28.0±0.82µs        ? ?/sec      1.00     27.5±1.08µs        ? ?/sec
run_criteria/yes_using_resource/031_systems              1.00     32.3±0.89µs        ? ?/sec      1.01     32.5±0.68µs        ? ?/sec
run_criteria/yes_using_resource/036_systems              1.00     36.3±0.93µs        ? ?/sec      1.03     37.4±1.02µs        ? ?/sec
run_criteria/yes_using_resource/041_systems              1.03     41.5±0.91µs        ? ?/sec      1.00     40.4±1.23µs        ? ?/sec
run_criteria/yes_using_resource/046_systems              1.00     45.6±1.16µs        ? ?/sec      1.00     45.8±1.34µs        ? ?/sec
run_criteria/yes_using_resource/051_systems              1.00     50.1±1.84µs        ? ?/sec      1.02     50.9±1.20µs        ? ?/sec
run_criteria/yes_using_resource/056_systems              1.00     55.5±1.52µs        ? ?/sec      1.00     55.7±2.04µs        ? ?/sec
run_criteria/yes_using_resource/061_systems              1.00     59.9±2.44µs        ? ?/sec      1.01     60.6±2.35µs        ? ?/sec
run_criteria/yes_using_resource/066_systems              1.00     65.7±2.92µs        ? ?/sec      1.01     66.6±2.42µs        ? ?/sec
run_criteria/yes_using_resource/071_systems              1.00     69.3±3.44µs        ? ?/sec      1.02     70.9±2.93µs        ? ?/sec
run_criteria/yes_using_resource/076_systems              1.00     74.0±3.37µs        ? ?/sec      1.02     75.2±3.24µs        ? ?/sec
run_criteria/yes_using_resource/081_systems              1.00     77.6±3.47µs        ? ?/sec      1.08     83.7±3.85µs        ? ?/sec
run_criteria/yes_using_resource/086_systems              1.00     86.4±3.11µs        ? ?/sec      1.04     89.5±4.70µs        ? ?/sec
run_criteria/yes_using_resource/091_systems              1.00     91.9±5.84µs        ? ?/sec      1.04     95.2±3.63µs        ? ?/sec
run_criteria/yes_using_resource/096_systems              1.00    101.5±4.58µs        ? ?/sec      1.01    102.4±4.49µs        ? ?/sec
run_criteria/yes_using_resource/101_systems              1.02    110.9±3.88µs        ? ?/sec      1.00    109.1±3.87µs        ? ?/sec
run_criteria/yes_with_labels/001_systems                 1.00      3.6±0.25µs        ? ?/sec      1.07      3.9±0.08µs        ? ?/sec
run_criteria/yes_with_labels/006_systems                 1.00      8.4±0.43µs        ? ?/sec      1.01      8.5±0.32µs        ? ?/sec
run_criteria/yes_with_labels/011_systems                 1.03     13.4±0.27µs        ? ?/sec      1.00     12.9±0.68µs        ? ?/sec
run_criteria/yes_with_labels/016_systems                 1.03     18.8±0.73µs        ? ?/sec      1.00     18.3±0.94µs        ? ?/sec
run_criteria/yes_with_labels/021_systems                 1.00     23.6±0.88µs        ? ?/sec      1.00     23.6±1.05µs        ? ?/sec
run_criteria/yes_with_labels/026_systems                 1.01     28.3±0.72µs        ? ?/sec      1.00     28.1±1.12µs        ? ?/sec
run_criteria/yes_with_labels/031_systems                 1.03     33.6±0.70µs        ? ?/sec      1.00     32.8±1.06µs        ? ?/sec
run_criteria/yes_with_labels/036_systems                 1.00     38.1±1.02µs        ? ?/sec      1.02     38.9±1.32µs        ? ?/sec
run_criteria/yes_with_labels/041_systems                 1.00     42.0±1.62µs        ? ?/sec      1.02     42.9±1.27µs        ? ?/sec
run_criteria/yes_with_labels/046_systems                 1.00     45.7±1.23µs        ? ?/sec      1.05     47.8±1.12µs        ? ?/sec
run_criteria/yes_with_labels/051_systems                 1.00     50.8±1.55µs        ? ?/sec      1.04     53.0±1.99µs        ? ?/sec
run_criteria/yes_with_labels/056_systems                 1.00     55.6±1.43µs        ? ?/sec      1.06     58.7±1.89µs        ? ?/sec
run_criteria/yes_with_labels/061_systems                 1.00     61.1±2.01µs        ? ?/sec      1.02     62.6±2.06µs        ? ?/sec
run_criteria/yes_with_labels/066_systems                 1.00     66.7±2.42µs        ? ?/sec      1.00     66.9±2.54µs        ? ?/sec
run_criteria/yes_with_labels/071_systems                 1.00     70.4±4.58µs        ? ?/sec      1.04     73.1±2.56µs        ? ?/sec
run_criteria/yes_with_labels/076_systems                 1.00     75.8±4.33µs        ? ?/sec      1.02     77.4±2.38µs        ? ?/sec
run_criteria/yes_with_labels/081_systems                 1.00     81.3±3.20µs        ? ?/sec      1.04     84.3±2.83µs        ? ?/sec
run_criteria/yes_with_labels/086_systems                 1.00     86.8±3.17µs        ? ?/sec      1.03     89.0±2.94µs        ? ?/sec
run_criteria/yes_with_labels/091_systems                 1.00     92.0±4.65µs        ? ?/sec      1.03     95.1±3.43µs        ? ?/sec
run_criteria/yes_with_labels/096_systems                 1.00     97.3±4.85µs        ? ?/sec      1.04    100.9±4.39µs        ? ?/sec
run_criteria/yes_with_labels/101_systems                 1.00    104.4±4.45µs        ? ?/sec      1.04    109.0±3.47µs        ? ?/sec
schedule/base                                            1.06     36.2±3.00µs        ? ?/sec      1.00     34.1±3.15µs        ? ?/sec
sized_commands_0_bytes/2000_commands                     1.00      5.0±0.01µs        ? ?/sec      1.00      5.0±0.01µs        ? ?/sec
sized_commands_0_bytes/4000_commands                     1.00     10.0±0.02µs        ? ?/sec      1.01     10.2±0.03µs        ? ?/sec
sized_commands_0_bytes/6000_commands                     1.00     15.2±0.04µs        ? ?/sec      1.01     15.3±0.06µs        ? ?/sec
sized_commands_0_bytes/8000_commands                     1.00     20.3±0.07µs        ? ?/sec      1.00     20.3±0.08µs        ? ?/sec
sized_commands_12_bytes/2000_commands                    1.00      7.1±0.02µs        ? ?/sec      1.00      7.1±0.05µs        ? ?/sec
sized_commands_12_bytes/4000_commands                    1.00     14.2±0.04µs        ? ?/sec      1.01     14.4±0.16µs        ? ?/sec
sized_commands_12_bytes/6000_commands                    1.00     21.6±0.18µs        ? ?/sec      1.00     21.7±0.10µs        ? ?/sec
sized_commands_12_bytes/8000_commands                    1.00     28.7±0.09µs        ? ?/sec      1.00     28.9±0.19µs        ? ?/sec
sized_commands_512_bytes/2000_commands                   1.01    103.0±3.17µs        ? ?/sec      1.00    102.1±4.56µs        ? ?/sec
sized_commands_512_bytes/6000_commands                   1.01   321.6±35.36µs        ? ?/sec      1.00   319.4±40.92µs        ? ?/sec
spawn_commands/2000_entities                             1.00    223.0±5.07µs        ? ?/sec      1.05    233.2±9.97µs        ? ?/sec
spawn_commands/6000_entities                             1.00   690.9±18.43µs        ? ?/sec      1.03   711.8±26.75µs        ? ?/sec
spawn_commands/8000_entities                             1.00   904.1±29.12µs        ? ?/sec      1.03   932.9±30.82µs        ? ?/sec
spawn_world/10000_entities                               1.00  1186.6±87.80µs        ? ?/sec      1.00  1186.3±87.84µs        ? ?/sec
spawn_world/1000_entities                                1.00   118.4±10.20µs        ? ?/sec      1.03    122.4±9.40µs        ? ?/sec
spawn_world/100_entities                                 1.00     11.8±0.88µs        ? ?/sec      1.01     11.9±1.00µs        ? ?/sec
spawn_world/10_entities                                  1.00  1193.0±120.09ns        ? ?/sec     1.05  1249.6±199.91ns        ? ?/sec
spawn_world/1_entities                                   1.00   120.4±10.07ns        ? ?/sec      1.00    120.0±9.93ns        ? ?/sec
world_entity/50000_entities                              1.00    173.1±2.25µs        ? ?/sec      2.45    424.3±0.52µs        ? ?/sec
world_get/50000_entities_sparse                          1.00   459.2±10.43µs        ? ?/sec      1.22    561.5±4.17µs        ? ?/sec
world_get/50000_entities_table                           1.00    451.2±0.85µs        ? ?/sec      2.06    931.0±6.42µs        ? ?/sec
world_query_for_each/50000_entities_sparse               1.00     84.1±0.30µs        ? ?/sec      1.00     84.4±0.21µs        ? ?/sec
world_query_for_each/50000_entities_table                1.00     27.1±0.03µs        ? ?/sec      1.00     27.2±0.03µs        ? ?/sec
world_query_get/50000_entities_sparse                    1.05    476.8±0.99µs        ? ?/sec      1.00    455.6±3.50µs        ? ?/sec
world_query_get/50000_entities_sparse_wide               1.00   1407.8±3.54µs        ? ?/sec      1.02   1435.2±3.78µs        ? ?/sec
world_query_get/50000_entities_table                     1.47    401.6±1.46µs        ? ?/sec      1.00    272.7±0.42µs        ? ?/sec
world_query_get/50000_entities_table_wide                1.02    836.1±2.73µs        ? ?/sec      1.00    816.7±1.94µs        ? ?/sec
world_query_iter/50000_entities_sparse                   1.00     95.5±0.16µs        ? ?/sec      1.01     96.6±0.37µs        ? ?/sec
world_query_iter/50000_entities_table                    1.00     27.2±0.07µs        ? ?/sec      1.00     27.2±0.06µs        ? ?/sec

crates/bevy_ecs/src/storage/sparse_set.rs Outdated Show resolved Hide resolved
@BoxyUwU BoxyUwU added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Dec 5, 2022
@james7132 james7132 changed the title Newtype ArchetypeIndex and TableRow Newtype ArchetypeRow and TableRow Dec 5, 2022
@cart
Copy link
Member

cart commented Dec 5, 2022

bors r+

bors bot pushed a commit that referenced this pull request Dec 5, 2022
# Objective
Prevent future unsoundness that was seen in #6623.

## Solution
Newtype both indexes in `Archetype` and `Table` as `ArchetypeRow` and `TableRow`. This avoids weird numerical manipulation on the indices, and can be stored and treated opaquely. Also enforces the source and destination of where these indices at a type level.

---

## Changelog
Changed: `Archetype` indices and `Table` rows have been newtyped as `ArchetypeRow` and `TableRow`.
@bors
Copy link
Contributor

bors bot commented Dec 5, 2022

Build failed:

@cart
Copy link
Member

cart commented Dec 6, 2022

No merge conflicts, but merging #6843 broke this build.

@james7132
Copy link
Member Author

james7132 commented Dec 6, 2022

Had to add ArchetypeRow::new to address it, made it pub, in line with TableRow::new. Should I also add a ArchetypeRow::index for parity?

@james7132
Copy link
Member Author

bors retry

bors bot pushed a commit that referenced this pull request Dec 6, 2022
# Objective
Prevent future unsoundness that was seen in #6623.

## Solution
Newtype both indexes in `Archetype` and `Table` as `ArchetypeRow` and `TableRow`. This avoids weird numerical manipulation on the indices, and can be stored and treated opaquely. Also enforces the source and destination of where these indices at a type level.

---

## Changelog
Changed: `Archetype` indices and `Table` rows have been newtyped as `ArchetypeRow` and `TableRow`.
@bors bors bot changed the title Newtype ArchetypeRow and TableRow [Merged by Bors] - Newtype ArchetypeRow and TableRow Dec 6, 2022
@bors bors bot closed this Dec 6, 2022
@james7132 james7132 added this to the 0.10 milestone Dec 6, 2022
ickshonpe pushed a commit to ickshonpe/bevy that referenced this pull request Dec 6, 2022
# Objective
Prevent future unsoundness that was seen in bevyengine#6623.

## Solution
Newtype both indexes in `Archetype` and `Table` as `ArchetypeRow` and `TableRow`. This avoids weird numerical manipulation on the indices, and can be stored and treated opaquely. Also enforces the source and destination of where these indices at a type level.

---

## Changelog
Changed: `Archetype` indices and `Table` rows have been newtyped as `ArchetypeRow` and `TableRow`.
@james7132 james7132 deleted the archetype-row-u32 branch December 12, 2022 06:51
alradish pushed a commit to alradish/bevy that referenced this pull request Jan 22, 2023
# Objective
Prevent future unsoundness that was seen in bevyengine#6623.

## Solution
Newtype both indexes in `Archetype` and `Table` as `ArchetypeRow` and `TableRow`. This avoids weird numerical manipulation on the indices, and can be stored and treated opaquely. Also enforces the source and destination of where these indices at a type level.

---

## Changelog
Changed: `Archetype` indices and `Table` rows have been newtyped as `ArchetypeRow` and `TableRow`.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective
Prevent future unsoundness that was seen in bevyengine#6623.

## Solution
Newtype both indexes in `Archetype` and `Table` as `ArchetypeRow` and `TableRow`. This avoids weird numerical manipulation on the indices, and can be stored and treated opaquely. Also enforces the source and destination of where these indices at a type level.

---

## Changelog
Changed: `Archetype` indices and `Table` rows have been newtyped as `ArchetypeRow` and `TableRow`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide P-Unsound A bug that results in undefined compiler behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants