06-12-2010 05:09 PM
Yes the compiler replaces compile time constants. The thing to remember is that the actual compiler is javac, rapc rearranges code and replaces bytecodes (especially if it is floating point as, I believe, LMcRae mentioned in an earlier topic). So stuff like variables not being removed or difference between a variable in a loop vs. outside the loop is javac, not rapc.
I would say to simply benchmark the individual functions with the different optimization techniques to see if you gain any actual speed in a real world app. I would also agree that Fixed32 is better then float, especially because of the (what seems like) constant floating point checks(?).
Just found his original post on bytecode: