Optimized log2(x) by making math.log(2) static.