2020-09-08 20:30:44 +00:00
|
|
|
[package]
|
|
|
|
name = "benches"
|
|
|
|
version = "0.1.0"
|
2021-10-27 00:12:14 +00:00
|
|
|
edition = "2021"
|
2021-11-13 23:06:48 +00:00
|
|
|
description = "Benchmarks for Bevy engine"
|
|
|
|
publish = false
|
|
|
|
license = "MIT OR Apache-2.0"
|
2020-09-08 20:30:44 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2022-03-29 22:18:07 +00:00
|
|
|
glam = "0.20"
|
2022-04-26 21:20:13 +00:00
|
|
|
rand = "0.8"
|
|
|
|
rand_chacha = "0.3"
|
2022-04-07 20:50:43 +00:00
|
|
|
criterion = { version = "0.3", features = ["html_reports"] }
|
2022-06-20 17:35:54 +00:00
|
|
|
bevy_app = { path = "../crates/bevy_app" }
|
2022-03-01 00:51:07 +00:00
|
|
|
bevy_ecs = { path = "../crates/bevy_ecs" }
|
bench: add `bevy_reflect::{List, Map, Struct}` benchmarks (#3690)
# Objective
Partially addresses #3594.
## Solution
This adds basic benchmarks for `List`, `Map`, and `Struct` implementors, both concrete (`Vec`, `HashMap`, and defined struct types) and dynamic (`DynamicList`, `DynamicMap` and `DynamicStruct`).
A few insights from the benchmarks (all measurements are local on my machine):
- Applying a list with many elements to a list with no elements is slower than applying to a list of the same length:
- 3-4x slower when applying to a `Vec`
- 5-6x slower when applying to a `DynamicList`
I suspect this could be improved by `reserve()`ing the correct length up front, but haven't tested.
- Applying a `DynamicMap` to another `Map` is linear in the number of elements, but applying a `HashMap` seems to be at least quadratic. No intuition on this one.
- Applying like structs (concrete -> concrete, `DynamicStruct` -> `DynamicStruct`) seems to be faster than applying unlike structs.
2022-05-17 04:16:53 +00:00
|
|
|
bevy_reflect = { path = "../crates/bevy_reflect" }
|
2022-03-01 00:51:07 +00:00
|
|
|
bevy_tasks = { path = "../crates/bevy_tasks" }
|
bench: add `bevy_reflect::{List, Map, Struct}` benchmarks (#3690)
# Objective
Partially addresses #3594.
## Solution
This adds basic benchmarks for `List`, `Map`, and `Struct` implementors, both concrete (`Vec`, `HashMap`, and defined struct types) and dynamic (`DynamicList`, `DynamicMap` and `DynamicStruct`).
A few insights from the benchmarks (all measurements are local on my machine):
- Applying a list with many elements to a list with no elements is slower than applying to a list of the same length:
- 3-4x slower when applying to a `Vec`
- 5-6x slower when applying to a `DynamicList`
I suspect this could be improved by `reserve()`ing the correct length up front, but haven't tested.
- Applying a `DynamicMap` to another `Map` is linear in the number of elements, but applying a `HashMap` seems to be at least quadratic. No intuition on this one.
- Applying like structs (concrete -> concrete, `DynamicStruct` -> `DynamicStruct`) seems to be faster than applying unlike structs.
2022-05-17 04:16:53 +00:00
|
|
|
bevy_utils = { path = "../crates/bevy_utils" }
|
2020-09-08 20:30:44 +00:00
|
|
|
|
2022-04-07 20:50:43 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "archetype_updates"
|
|
|
|
path = "benches/bevy_ecs/archetype_updates.rs"
|
|
|
|
harness = false
|
|
|
|
|
2022-03-29 22:18:07 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "ecs_bench_suite"
|
|
|
|
path = "benches/bevy_ecs/ecs_bench_suite/mod.rs"
|
|
|
|
harness = false
|
|
|
|
|
2022-04-26 19:59:19 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "run_criteria"
|
|
|
|
path = "benches/bevy_ecs/run_criteria.rs"
|
|
|
|
harness = false
|
|
|
|
|
2021-06-28 23:26:29 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "commands"
|
|
|
|
path = "benches/bevy_ecs/commands.rs"
|
|
|
|
harness = false
|
|
|
|
|
bench: add `bevy_reflect::{List, Map, Struct}` benchmarks (#3690)
# Objective
Partially addresses #3594.
## Solution
This adds basic benchmarks for `List`, `Map`, and `Struct` implementors, both concrete (`Vec`, `HashMap`, and defined struct types) and dynamic (`DynamicList`, `DynamicMap` and `DynamicStruct`).
A few insights from the benchmarks (all measurements are local on my machine):
- Applying a list with many elements to a list with no elements is slower than applying to a list of the same length:
- 3-4x slower when applying to a `Vec`
- 5-6x slower when applying to a `DynamicList`
I suspect this could be improved by `reserve()`ing the correct length up front, but haven't tested.
- Applying a `DynamicMap` to another `Map` is linear in the number of elements, but applying a `HashMap` seems to be at least quadratic. No intuition on this one.
- Applying like structs (concrete -> concrete, `DynamicStruct` -> `DynamicStruct`) seems to be faster than applying unlike structs.
2022-05-17 04:16:53 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "system_stage"
|
|
|
|
path = "benches/bevy_ecs/stages.rs"
|
|
|
|
harness = false
|
|
|
|
|
2021-07-27 23:19:26 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "world_get"
|
|
|
|
path = "benches/bevy_ecs/world_get.rs"
|
|
|
|
harness = false
|
|
|
|
|
2022-06-20 17:35:54 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "schedule"
|
|
|
|
path = "benches/bevy_ecs/schedule.rs"
|
|
|
|
harness = false
|
|
|
|
|
bench: add `bevy_reflect::{List, Map, Struct}` benchmarks (#3690)
# Objective
Partially addresses #3594.
## Solution
This adds basic benchmarks for `List`, `Map`, and `Struct` implementors, both concrete (`Vec`, `HashMap`, and defined struct types) and dynamic (`DynamicList`, `DynamicMap` and `DynamicStruct`).
A few insights from the benchmarks (all measurements are local on my machine):
- Applying a list with many elements to a list with no elements is slower than applying to a list of the same length:
- 3-4x slower when applying to a `Vec`
- 5-6x slower when applying to a `DynamicList`
I suspect this could be improved by `reserve()`ing the correct length up front, but haven't tested.
- Applying a `DynamicMap` to another `Map` is linear in the number of elements, but applying a `HashMap` seems to be at least quadratic. No intuition on this one.
- Applying like structs (concrete -> concrete, `DynamicStruct` -> `DynamicStruct`) seems to be faster than applying unlike structs.
2022-05-17 04:16:53 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "reflect_list"
|
|
|
|
path = "benches/bevy_reflect/list.rs"
|
|
|
|
harness = false
|
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
name = "reflect_map"
|
|
|
|
path = "benches/bevy_reflect/map.rs"
|
|
|
|
harness = false
|
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
name = "reflect_struct"
|
|
|
|
path = "benches/bevy_reflect/struct.rs"
|
|
|
|
harness = false
|
|
|
|
|
2020-09-08 20:30:44 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "iter"
|
|
|
|
path = "benches/bevy_tasks/iter.rs"
|
2020-09-10 19:54:24 +00:00
|
|
|
harness = false
|