[parenscript-devel] Feature proposal: Optimize away constant arithmetic

16 Jun
2007
16 Jun
'07
3:24 a.m.
This is a feature I'm planning to add to ParenScript that involves eager evaluation for arithmetic constants, so for example: (js (+ foo.bar 0)) => "foo.bar;" (js (+ foo.bar 1 -1)) => "foo.bar;" (js (+ foo.bar 2 3)) => "foo.bar + 5;" This would make the generated Javascript be a few bytes shorter, but more importantly it seems that many Javascript implementations don't do constant arithmetic optimizations themselves, so it would speed up the generated Javascript as well.
6481
Age (days ago)
6481
Last active (days ago)
0 comments
1 participants
participants (1)
-
Vladimir Sedach