Skip to content

Conversation

@ltratt
Copy link
Member

@ltratt ltratt commented Aug 14, 2025

No description provided.

* Transparently optimise `iter_{set|unset}_bits(...).count()` to use platform
"count bits" directly, rather than forcing the full iterator to execute.
Depending on your machine, this can lead to savings of 2-3 orders of magnitude.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it worth mentioning, but we updated the 'normal' interator.count() too.
It now does math instead of exhausting the iterator (range.count())

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did think briefly think about adding that in, but I came down on the side of "don't distract readers from the major things that will benefit them". I think the iter_bits.count() optimisation is something that a lot of users will really benefit from.

@vext01 vext01 added this pull request to the merge queue Aug 14, 2025
Merged via the queue into softdevteam:master with commit 1fd2c5c Aug 14, 2025
2 checks passed
@ltratt ltratt deleted the vob_3_0_6 branch August 14, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants