bevy/crates
François 234b2efa71 Inline world get (#2520)
# Objective

While looking at the code of `World`, I noticed two basic functions (`get` and `get_mut`) that are probably called a lot and with simple code that are not `inline`

## Solution

- Add benchmark to check impact
- Add `#[inline]`


```
group                                            this pr                                main
-----                                            ----                                   ----
world_entity/50000_entities                      1.00   115.9±11.90µs        ? ?/sec    1.71   198.5±29.54µs        ? ?/sec
world_get/50000_entities_SparseSet               1.00   409.9±46.96µs        ? ?/sec    1.18   483.5±36.41µs        ? ?/sec
world_get/50000_entities_Table                   1.00   391.3±29.83µs        ? ?/sec    1.16   455.6±57.85µs        ? ?/sec
world_query_for_each/50000_entities_SparseSet    1.02   121.3±18.36µs        ? ?/sec    1.00   119.4±13.88µs        ? ?/sec
world_query_for_each/50000_entities_Table        1.03     13.8±0.96µs        ? ?/sec    1.00     13.3±0.54µs        ? ?/sec
world_query_get/50000_entities_SparseSet         1.00   666.9±54.36µs        ? ?/sec    1.03   687.1±57.77µs        ? ?/sec
world_query_get/50000_entities_Table             1.01   584.4±55.12µs        ? ?/sec    1.00   576.3±36.13µs        ? ?/sec
world_query_iter/50000_entities_SparseSet        1.01   169.7±19.50µs        ? ?/sec    1.00   168.6±32.56µs        ? ?/sec
world_query_iter/50000_entities_Table            1.00     26.2±1.38µs        ? ?/sec    1.91     50.0±4.40µs        ? ?/sec
```

I didn't add benchmarks for the mutable path but I don't see how it could hurt to make it inline too...
2021-07-27 23:19:26 +00:00
..
bevy_app Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_asset Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_audio Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_core Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_derive Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_diagnostic Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_dylib Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_dynamic_plugin Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_ecs Inline world get (#2520) 2021-07-27 23:19:26 +00:00
bevy_gilrs Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_gltf Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_input Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_internal Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_log Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_macro_utils Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_math Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_pbr Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_reflect Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_render Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_scene Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_sprite Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_tasks Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_text Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_transform Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_ui Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_utils Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_wgpu Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_window Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_winit Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00