kripken/emscripten — pull request #2226 by sunfishcode (2014-03-15 00:17:33+00:00)
Title: Short-circuitize bitwise expressions.

In controlling-expression contexts, convert bitwise expressions like
(x|y) into (x?1:y) when safe and when y is "non-trivial", to allow the
computation of y to be short-circuited out.

This gets a 3% speedup on emscripten's test_zzz_box2d, and an 8% speedup on bench2d (a different box2d benchmark).