mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 00:44:33 +00:00
5186066cf5
Suppose the input list is presorted, sorting a sorted vec would be cheaper than .insert()-ing sorted items one by one. In my "linux" repo (watchman eanbled): - jj-0: baseline - jj-1: previous (don't randomize by HashMap) - jj-2: this % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1,jj-2 \ "target/release-with-debug/{bin} -R ~/mirrors/linux status" Benchmark 1: target/release-with-debug/jj-0 -R ~/mirrors/linux status Time (mean ± σ): 1.034 s ± 0.020 s [User: 0.881 s, System: 0.212 s] Range (min … max): 1.011 s … 1.068 s 10 runs Benchmark 2: target/release-with-debug/jj-1 -R ~/mirrors/linux status Time (mean ± σ): 849.3 ms ± 13.8 ms [User: 710.7 ms, System: 199.3 ms] Range (min … max): 821.7 ms … 870.2 ms 10 runs Benchmark 3: target/release-with-debug/jj-2 -R ~/mirrors/linux status Time (mean ± σ): 786.2 ms ± 16.7 ms [User: 650.7 ms, System: 204.1 ms] Range (min … max): 760.8 ms … 805.2 ms 10 runs Relative speed comparison 1.32 ± 0.04 target/release-with-debug/jj-0 -R ~/mirrors/linux status 1.08 ± 0.03 target/release-with-debug/jj-1 -R ~/mirrors/linux status 1.00 target/release-with-debug/jj-2 -R ~/mirrors/linux status |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |