Skip to content

Commit 08ecb53

Browse files
committed
Add bench profiles to Cargo.toml to force codegen-units=1
This makes a small difference for NetworkGraph deserialization as it enables more inlining across different files, hopefully better matching user performance as well. As of this commit, on an Intel 2687W v3, the serialization benchmarks take: test routing::network_graph::benches::read_network_graph ... bench: 2,037,875,071 ns/iter (+/- 760,370) test routing::network_graph::benches::write_network_graph ... bench: 320,561,557 ns/iter (+/- 176,343)
1 parent c7113bc commit 08ecb53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ panic = "abort"
2222
opt-level = 3
2323
lto = true
2424
panic = "abort"
25+
26+
[profile.bench]
27+
opt-level = 3
28+
codegen-units = 1
29+
lto = true

0 commit comments

Comments
 (0)