mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-26 14:06:13 +00:00
12d7f8be16
RepoPath::from_components() is removed since it is no longer a primitive function. The components iterator could be implemented on top of str::split(), but it's not as we'll probably want to add components.as_path() -> &RepoPath. Tree walking and tree_states map construction get slightly faster thanks to fewer allocations and/or better cache locality. If we add a borrowed RepoPath type, we can also implement a cheap &str to &RepoPath conversion on top. Then, we can get rid of BTreeMap<RepoPath, FileState> construction at all. Snapshot without watchman: ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ "target/release-with-debug/{bin} -R ~/mirrors/linux status" Benchmark 1: target/release-with-debug/jj-0 -R ~/mirrors/linux status Time (mean ± σ): 950.1 ms ± 24.9 ms [User: 1642.4 ms, System: 681.1 ms] Range (min … max): 913.8 ms … 990.9 ms 10 runs Benchmark 2: target/release-with-debug/jj-1 -R ~/mirrors/linux status Time (mean ± σ): 872.1 ms ± 14.5 ms [User: 1922.3 ms, System: 625.8 ms] Range (min … max): 853.2 ms … 895.9 ms 10 runs Relative speed comparison 1.09 ± 0.03 target/release-with-debug/jj-0 -R ~/mirrors/linux status 1.00 target/release-with-debug/jj-1 -R ~/mirrors/linux status ``` Tree walk: ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ "target/release-with-debug/{bin} -R ~/mirrors/linux files --ignore-working-copy" Benchmark 1: target/release-with-debug/jj-0 -R ~/mirrors/linux files --ignore-working-copy Time (mean ± σ): 375.3 ms ± 15.4 ms [User: 223.3 ms, System: 151.8 ms] Range (min … max): 359.4 ms … 394.1 ms 10 runs Benchmark 2: target/release-with-debug/jj-1 -R ~/mirrors/linux files --ignore-working-copy Time (mean ± σ): 357.1 ms ± 16.2 ms [User: 214.7 ms, System: 142.6 ms] Range (min … max): 341.6 ms … 378.9 ms 10 runs Relative speed comparison 1.05 ± 0.06 target/release-with-debug/jj-0 -R ~/mirrors/linux files --ignore-working-copy 1.00 target/release-with-debug/jj-1 -R ~/mirrors/linux files --ignore-working-copy ``` |
||
---|---|---|
.. | ||
test_bad_locking.rs | ||
test_commit_builder.rs | ||
test_commit_concurrent.rs | ||
test_conflicts.rs | ||
test_default_revset_graph_iterator.rs | ||
test_diff_summary.rs | ||
test_git.rs | ||
test_id_prefix.rs | ||
test_index.rs | ||
test_init.rs | ||
test_load_repo.rs | ||
test_local_working_copy.rs | ||
test_local_working_copy_concurrent.rs | ||
test_local_working_copy_sparse.rs | ||
test_merge_trees.rs | ||
test_merged_tree.rs | ||
test_mut_repo.rs | ||
test_operations.rs | ||
test_refs.rs | ||
test_revset.rs | ||
test_rewrite.rs | ||
test_view.rs | ||
test_workspace.rs |