I was disappointed when I disassembled the code using the KiROUND() inline function
solution to see that it was not pre-computing constants when used in static initializers. So we have two use cases, and need two solutions to be optimal, since the compiler is too stupid to do the right thing. I think we need something else for compile time computable constants, to be optimal in both use cases. There is quite a bit of code savings by using a macro for that situation from my testing. To fully capitalize on this, we need to go back and make Mm2mils() and what not macros also, or have MACRO versions of them too.
Showing
Please register or sign in to comment