A SWAR Approach to Counting Ones
Holger Petersen

TL;DR
This paper explores the computational complexity of counting ones in binary representations using various operations, revealing new bounds for algorithms with different sets of allowed operations.
Contribution
It introduces improved complexity bounds for counting ones with addition, logical operations, and multiplication, extending previous results.
Findings
Counting ones with addition and logical operations takes O(log^2(n)) steps.
Parity can be computed in O(log(n)) steps, matching shift-based methods.
Multiplication enables counting ones in O(log^*(n)) time, better than previous bounds.
Abstract
We investigate the complexity of algorithms counting ones in different sets of operations. With addition and logical operations (but no shift) steps suffice to count ones. Parity can be computed with complexity , which is the same bound as for methods using shift-operations. If multiplication is available, a solution of time complexity is possible improving the known bound .
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Complexity and Algorithms in Graphs · Computability, Logic, AI Algorithms
