In Quiz 1, multiple different implementations for bit reversal were given and you were asked to consider the algorithms with respect to speed, RAM, and code space. (You can see the code at Godbolt.)
Choose a small algorithm to implement in different ways. Describe when/why you might use each. You can choose any small algorithm.
Some possible options include:
- How many bits are one in a given 32-bit uint?
- How many leading zeros are in a 32-bit uint?
- Trigonometry functions like sin, cos, tan
- Integer division with remainder
- Find the first 100 prime numbers