diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-15 10:11:30 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-16 06:53:08 +1100 |
| commit | 60851b08e523e1a3ab4defc8b6049751b6bf1ad5 (patch) | |
| tree | 5257d399c52f50a9de0d9f04844d3748f2e540ac /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 2918a7d5a9e65721a31598b50e975ae0882feac3 (diff) | |
| download | rust-60851b08e523e1a3ab4defc8b6049751b6bf1ad5.tar.gz rust-60851b08e523e1a3ab4defc8b6049751b6bf1ad5.zip | |
Optimize `BitSet` iteration.
This commit removes an `Option` check in `BitIter::next()`, avoids calling `trailing_zeros()` when it's not necessary, and avoids the need for `enumerate()`. This gives a tiny (0.2%) instruction count win on a couple of benchmarks. The commit also adds some comments, which is good because this iteration code is moderately complex.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
