3 ms·
> You even get better aliasing optimizations* using union/bit fields over just using bit shifts. My own experience with bit field optimizations was that they w
by pkaye 9y ago
> You even get better aliasing optimizations* using union/bit fields over just using bit shifts.
My own experience with bit field optimizations was that they were worse in general for GCC and ARM compilers from 4+ years ago. LLVM was much better. For example if you tried to set a few fields that fit within a machine word to a constant value, it should be possible to set them in a single opcode but only LLVM takes the liberty to do this.