-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: restore bitCount32 test #489
Conversation
bitCount32's test is skipped because it is slow, and it's slow because it iterates over all integers between 0 and 2^32. This keeps that test skipped but adds a new test that we can run, which only tests a few inputs. It also speeds up the test-only comparison function by about 9x in my testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Was initially hesitant because the idea of the test/comparison bit count is something so simple it doesn't need a test itself, and bitwise functions scare me, but re-reading the slowBitCount
function, I think it's obvious enough to be used as a test comparison case.
Looks good to me.
This change is not urgent.
bitCount32's test is skipped because it is slow, and it's slow because it iterates over all integers between 0 and 232.
This keeps that test skipped but adds a new test that we can run, which only tests a few inputs. It also speeds up the test-only comparison function by about 9x in my testing.