News for hackers. Stuff that matters.
Re:HTML5 Deck of Cards by jpollock on Thursday September 03, 2015 @11:28AM (#10165466)
There is no substantial difference in performance on mine (within 2%), although the OR was always a little bit faster.

Chrome 45 on Linux

It's odd that a bitwise operator should have the effect of truncating the float (since X|0 == X)? I'm guessing there's an implicit type conversion to int in the middle?

Re:HTML5 Deck of Cards by TazeTSchnitzel on Thursday September 03, 2015 @11:38AM (#10165526)
The bitwise operators don't make sense for floating-point values. So they work by converting to a 32-bit integer first.