Optimize pow(2,x) by using (1<<x).
Merge remote-tracking branch 'origin/checked' into spike