Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I fail to see the logic behind optimizing around conditionals when you are running in an interpreted language.


I instrumented the code and using conditionals resulted in 2x the generation time per loop. These loops are executed only once so the VM doesn't have a chance to optimise them.


I've done similar in the past and can concur that it does have large performance benefits, at least in Chrome where I tested it.


Stating the obvious, but I'm pretty sure that there are no longer any purely interpreting JS engines around, it's all JIT or AOT compiled, so optimizing for a compilation scenario definitely makes sense.


Testing beats imagination.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: