Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Use `HybridBitSet` in `SparseBitMatrix`. #54318
Conversation
`SparseBitSet` is the only remaining user of `ArrayVec`. This commit switches it to using `SmallVec`, and removes `array_vec.rs`. Why the switch? Although `SparseBitSet` is size-limited and doesn't need the ability to spill to the heap, `SmallVec` has many more features than `ArrayVec`. In particular, it's now possible to keep `SparseBitSet`'s elements in sorted order, which gives in-order iteration, which is a requirement for the next commit.
|
This comment has been hidden.
This comment has been hidden.
This requires adding a few extra methods to `HybridBitSet`. (These are tested in a new unit test.) This commit reduces the `max-rss` for `nll-check` builds of `html5ever` by 46%, `ucd` by 45%, `clap-rs` by 23%, `inflate` by 14%. And the results for the `unic-ucd-name` crate are even more impressive: a 21% reduction in instructions, a 60% reduction in wall-time, a 96% reduction in `max-rss`, and a 97% reduction in faults! Fixes #52028.
b457ed0
to
154be2c
|
The submodules changes were accidental, and I have reverted them. |
The second commit is probably the cause of this, because it removes |
|
@bors try |
…x, r=<try> Use `HybridBitSet` in `SparseBitMatrix`. This fixes most of the remaining NLL memory regression. r? @pnkfelix, because you reviewed #54286. cc @nikomatsakis, because NLL cc @Mark-Simulacrum, because this removes `array_vec.rs` cc @lqd, because this massively improves `unic-ucd-name`, and probably other public crates
|
|
|
@rust-timer build c243f30 |
|
Success: Queued c243f30 with parent b80cb47, comparison URL. |
|
Looks great to me. The dummy bitsets are unfortunate, but I'd rather land this first and then after that, maybe I will investigate revising the coding patterns to get rid of them. |
|
@bors r+ |
|
|
|
ah, I guess it would be prudent to wait until the results are back from rust-timer. @bors r- |
|
I expect the rust-timer results will be much the same as what I got locally, but sure, we can wait. |
|
perf results are ready, awesome improvements for max-rss as expected |
|
@bors r+ |
|
|
|
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
…x, r=pnkfelix Use `HybridBitSet` in `SparseBitMatrix`. This fixes most of the remaining NLL memory regression. r? @pnkfelix, because you reviewed #54286. cc @nikomatsakis, because NLL cc @Mark-Simulacrum, because this removes `array_vec.rs` cc @lqd, because this massively improves `unic-ucd-name`, and probably other public crates
|
|
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
@bors retry |
…x, r=pnkfelix Use `HybridBitSet` in `SparseBitMatrix`. This fixes most of the remaining NLL memory regression. r? @pnkfelix, because you reviewed #54286. cc @nikomatsakis, because NLL cc @Mark-Simulacrum, because this removes `array_vec.rs` cc @lqd, because this massively improves `unic-ucd-name`, and probably other public crates
I'd love to know how to avoid them. I asked about this for a similar example in /r/rust and the answers all involved repeated matches and |
|
|
|
AFAICT, the @bors retry, I guess |
|
@bors retry |
…x, r=pnkfelix Use `HybridBitSet` in `SparseBitMatrix`. This fixes most of the remaining NLL memory regression. r? @pnkfelix, because you reviewed #54286. cc @nikomatsakis, because NLL cc @Mark-Simulacrum, because this removes `array_vec.rs` cc @lqd, because this massively improves `unic-ucd-name`, and probably other public crates
|
|
This fixes most of the remaining NLL memory regression.
r? @pnkfelix, because you reviewed #54286.
cc @nikomatsakis, because NLL
cc @Mark-Simulacrum, because this removes
array_vec.rscc @lqd, because this massively improves
unic-ucd-name, and probably other public crates