KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
It is possible to re-express: i % m as: i & (m-1) where, i is an unsigned integer m is a power of 2 My question is: is the AND operation any faster? Don't modern CPUs support integer modulo in hardware in a single instruction? I'm interested in ARM, but don't see the modulo operation in its instruction set.
Tags (comma-separated)
Save Edits
Cancel