Hacker News new | past | comments | ask | show | jobs | submit login

Possibly, but the types by a VM are rarely guaranteed to be completely accurate (some traps will be included in optimised code to capture the cases where types may not be as expected). They may only be true for the particular input data, other other libraries used, or stuff like that.

Using previous runs to inform the JIT of expected types is entirely reasonable though, and think various JS implementations already do this.




> some traps will be included in optimised code to capture the cases where types may not be as expected

none of that should matter. if the resulting JIT'd code is faster with the traps than the plain js without them, so be it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: