Write a function to reverse the bits of a 32-bit unsigned integer and optimize it for execution speed.
Implement reverse_bits(n), accepting an integer from 0 through 2^32 - 1 and returning the integer formed by reversing all 32 bits. Prefer a fixed sequence of bitwise operations over per-bit iteration. The result must remain within the unsigned 32-bit range.
def reverse_bits(n):