jj/lib
Yuya Nishihara 05c7da3db0 diff: reuse precomputed hash values
This isn't always fast because it increases the chance of cache miss, but in
practice, it makes "jj file annotate" faster. It's still slower than
"git blame", though.

Maybe we should also change the hash function.

```
group                             new                     old
-----                             ---                     ---
bench_diff_git_git_read_tree_c    1.00     45.2±0.38µs    1.29     58.4±0.32µs
bench_diff_lines/modified/10k     1.00     32.7±0.24ms    1.05     34.4±0.17ms
bench_diff_lines/modified/1k      1.00      2.9±0.00ms    1.06      3.1±0.01ms
bench_diff_lines/reversed/10k     1.00     22.7±0.18ms    1.02     23.2±0.29ms
bench_diff_lines/reversed/1k      1.00    439.0±9.46µs    1.19    523.9±6.05µs
bench_diff_lines/unchanged/10k    1.00      2.9±0.06ms    1.20      3.5±0.02ms
bench_diff_lines/unchanged/1k     1.00    240.8±1.03µs    1.30    312.1±1.05µs
```

```
% hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \
  'target/release-with-debug/{bin} --ignore-working-copy file annotate lib/src/revset.rs'
Benchmark 1: target/release-with-debug/jj-0 ..
  Time (mean ± σ):      1.604 s ±  0.259 s    [User: 1.543 s, System: 0.057 s]
  Range (min … max):    1.348 s …  1.917 s    10 runs

Benchmark 2: target/release-with-debug/jj-1 ..
  Time (mean ± σ):      1.183 s ±  0.026 s    [User: 1.118 s, System: 0.062 s]
  Range (min … max):    1.155 s …  1.237 s    10 runs
```
2024-11-20 10:36:08 +09:00
..
benches style: add semicolon at the end of expressions used as statements 2024-10-04 22:29:13 +02:00
gen-protos
proc-macros style: remove useless uses of .iter() 2024-10-04 22:29:13 +02:00
src diff: reuse precomputed hash values 2024-11-20 10:36:08 +09:00
tests revset: allow tags() to take a pattern for an argument 2024-11-20 00:47:23 +00:00
testutils transaction: propagate errors from commit() 2024-11-13 23:05:24 -08:00
Cargo.toml cargo: import fix_filter from gix::filter::plumbing 2024-11-14 22:38:04 +09:00
LICENSE