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

If you call a function with a different number or type of arguments, or an object that has different keys, or even keys that you added in a different order, bets are off and the optimizer might not be able to reuse previously optimized versions of the function. And if you do this several times, the engine might give up optimizing your function entirely.


Worth noting that this is valid advice for nearly everything with a JIT (and many languages with generics without a JIT, since doing so likely bloats your dispatch logic, whether it's dynamic or built at compile-time).




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

Search: