Closed dylanhart closed 2 years ago
All methods touching the time package a significantly slower than their chrono counterparts.
time
chrono
git checkout v0.5.0 cargo bench
test bench_from_string ... bench: 14 ns/iter (+/- 2) test bench_from_time ... bench: 8 ns/iter (+/- 0) test bench_generator_generate ... bench: 42 ns/iter (+/- 1) test bench_new ... bench: 44 ns/iter (+/- 0) test bench_to_str ... bench: 7 ns/iter (+/- 0) test bench_to_string ... bench: 20 ns/iter (+/- 0)
git checkout v0.6.0 cargo bench
test bench_from_string ... bench: 13 ns/iter (+/- 1) test bench_from_time ... bench: 12 ns/iter (+/- 1) test bench_generator_generate ... bench: 55 ns/iter (+/- 1) test bench_new ... bench: 58 ns/iter (+/- 1) test bench_to_str ... bench: 7 ns/iter (+/- 0) test bench_to_string ... bench: 20 ns/iter (+/- 1)
The dependency on time has been dropped.
All methods touching the
time
package a significantly slower than theirchrono
counterparts.v0.5.0
v0.6.0