perf: add benchmark, optimize
Realized about a 10x speedup. - add benches/million-updates.rs - optimization: use rand instead of nanorand (because of thread_rng() initialization being muchf aster) - update README Signed-off-by: Stephen Waits <steve@waits.net>
This commit is contained in:
1 parent
84a818b9b9
commit
737f533f7e
7 files changed
+90
-16
No files matched your search
+12
-1
@@ -20,13 +20,24 @@ default = ["f32"]
|
||||
f32 = []
|
||||
f64 = []
|
||||
|
||||
[profile.bench]
|
||||
debug = true
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
||||
[dev-dependencies]
|
||||
assert_approx_eq = "1.1.0"
|
||||
criterion = "0.4.0"
|
||||
proptest = "1.0.0"
|
||||
serde_json = "1.0.91"
|
||||
|
||||
[[bench]]
|
||||
name = "million-updates"
|
||||
harness = false
|
||||
|
||||
[dependencies]
|
||||
nanorand = {version = "0.7.0", features = ["wyrand", "getrandom"]}
|
||||
num-traits = "0.2.15"
|
||||
rand = "0.8.5"
|
||||
serde = {version = "1.0.152", features = ["serde_derive"]}
|
||||
serde_with = "2.2.0"
|
||||
Reference in new issue
Block a user