faster powerOf2 implementation courtesy of Brendan: https://twitter.com/BrendanEich/status/310843952439889920