about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-22 15:12:15 +0000
committerbors <bors@rust-lang.org>2019-06-22 15:12:15 +0000
commit4a365a29d64bec75d107214319a129ba68fc12a3 (patch)
tree53411659f0e073468d798001b442873717ebf65b /src/libsyntax/parse/parser/expr.rs
parentd4d5d67c1c20b9599c812ab4d926ab4fa9fe6935 (diff)
parent3f28811774da8ee16bd6391a0e66d23e6962485f (diff)
downloadrust-4a365a29d64bec75d107214319a129ba68fc12a3.tar.gz
rust-4a365a29d64bec75d107214319a129ba68fc12a3.zip
Auto merge of #61020 - HeroicKatora:master, r=matthewjasper
librustc_data_structures: Speedup union of sparse and dense hybrid set

This optimization speeds up the union of a hybrid bitset when that
switches it from a sparse representation to a dense bitset. It now
clones the dense bitset and integrate only the spare elements instead of
densifying the sparse bitset, initializing all elements, and then a
union on two dense bitset, touching all words a second time.

It's not completely certain if the added complexity is worth it but I would
like to hear some feedback in any case. Benchmark results from my machine:

```
Now:  bit_set::union_hybrid_sparse_to_dense ... bench:          72 ns/iter (+/- 5)
Previous: bit_set::union_hybrid_sparse_to_dense ... bench:          90 ns/iter (+/- 6)
```

This being the second iteration of trying to improve the speed, since I missed the return value in the first, and forgot to run the relevant tests. Oops.
Diffstat (limited to 'src/libsyntax/parse/parser/expr.rs')
0 files changed, 0 insertions, 0 deletions