Skip to content

Newer version of bitCount() #112

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

Merged
merged 1 commit into from
Sep 1, 2015

Conversation

sdboyer
Copy link
Contributor

@sdboyer sdboyer commented Sep 1, 2015

This updates ctrie.bitCount() from "version 1" to "version 3" of Jörg Arndt's 32-bit bitcount function (according to http://www.jjj.de/bitwizardry/files/bitcount.h)

I'm quite inexpert at these things, but benchmarking definitely suggests an improvement here (certainly it generates a lot less assembly). Hand-writing the assembly would probably be even better, but I suspect that might be beyond the realm of practical benefits, given that my general benchmarks suggest <4% of overall CPU time is spent here.

This updates to "version 3" of Jörg Arndt's 32-bit bitcount function,
according to http://www.jjj.de/bitwizardry/files/bitcount.h
@tylertreat-wf
Copy link
Contributor

+1

@alexandercampbell-wf @dustinhiatt-wf @stevenosborne-wf

@dustinhiatt-wf
Copy link
Contributor

+1

2 similar comments
@stevenosborne-wf
Copy link
Contributor

+1

@alexandercampbell-wk
Copy link
Contributor

+1

alexandercampbell-wk added a commit that referenced this pull request Sep 1, 2015
@alexandercampbell-wk alexandercampbell-wk merged commit 5fb8adc into Workiva:master Sep 1, 2015
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.

5 participants