|
|
|
|
|
by za3faran
30 days ago
|
|
Rust: concat/string time: [77.801 ns 78.103 ns 78.430 ns]
change: [+0.0275% +0.3169% +0.6169%] (p = 0.03 < 0.05)
Change within noise threshold.
formatted/string time: [31.471 ns 31.569 ns 31.699 ns]
change: [+0.1277% +0.3915% +0.6788%] (p = 0.01 < 0.05).
Change within noise threshold.
Java Benchmarks.concat string avgt 15 8.632 ± 0.105 ns/op
Benchmarks.format string avgt 15 64.971 ± 1.406 ns/op
Java's string concat is faster than rust's offerings. |
|
I guess if you are formatting strings constantly this is important, but you can also use a bump allocator in rust if you really wanted to.