AS3 Bitwise gems - fast integer math
lab.polygonal.de
lab.polygonal.de
http://www.mozilla.org/projects/tamarin/
Flash opcodes into Nanojit IR:
http://hg.mozilla.org/tamarin-central/raw-file/4eb9f961a087/...
Nanojit IR to native x86 translation tables?
http://hg.mozilla.org/tamarin-central/raw-file/4eb9f961a087/...
a / 64
to a >> 6
? I could understand it in a dynamically typed language, where a, and therefore the result, could be non-integer, but ActionScript seems to have static type declarations for variables. int a;
int b = 64;
a / b
requires dataflow analysis so you can do constant propagation, copy propagation, and dead code elimination. This is more work to get right, but that's not a very good excuse for not at least doing the peephole optimization.