]> git.lizzy.rs Git - rust.git/commit
Make SparseBitMatrix a bit lazier.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 23 Aug 2018 04:29:38 +0000 (14:29 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Thu, 23 Aug 2018 08:41:55 +0000 (18:41 +1000)
commit002f03b654845667023cdaad8af988909a030bfe
treecd7877d3c12195da66650d62354c13192b7d70c9
parent7f4c168a9dd2195b45998ddfecdac111663b26d1
Make SparseBitMatrix a bit lazier.

Currently when a row is instantiated in SparseBitMatrix, any missing
rows prior to it are also fully instantiated.

This patch changes things so that those prior rows are minimally
instantiated (with a `None`). This avoids a decent number of allocations
in NLL, speeding up several benchmarks by up to 0.5%.

The patch also removes two unused methods, `len()` and
`iter_enumerated()`.
src/librustc_data_structures/bitvec.rs