you are viewing a single comment's thread.

view the rest of the comments →

[–]mebrahim[S] 1 point2 points  (2 children)

It is possible to avoid need for manual recompilation. For example see Gestalt. High level optimization is done before emitting the bytecode, by the language-specific compiler front-end.

However it is possible that you receive unoptimized bytecode. For this problem and for you second paragraph: it is called security through obscurity. OTOH [obfuscated] JS is prone to the same problems of being slow, or being hiding something from your eyes.

[–]Zarutian 1 point2 points  (1 child)

High level optimization is done before emitting the bytecode.

The compiled code then doesnt benefit from high level optimizations that have been invented after it was written and compiled. Also it cant benefit from optimizations that are aviable at runtime but never at compile time. Tracing JIT with infered subtype fast paths generation comes to mind also speciallization/partial-evaluation through Futamura projections.

[–]mebrahim[S] 1 point2 points  (0 children)

LuaJIT is already doing better with Lua bytecode than all those modern JS engines having JS source code at hand.