Or is it better?
It's better - as long as you only need 2^some integer value, as a logical shift left (as it's called) is a single in-line CPU instruction. No FPU setup overhead, no conversion overhead and no invokation overhead. but this is no usefull explanation why the runtime implementation should be different from compiler time implementation,
Well for starters the FPU could be in a different state at compile time vs. runtime.