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

The problem with relying on JITs inlining things is that you're hoping that an opaque optimizer will come to the same conclusion as you, and historically there have been all sorts of things that spontaneously kill optimizations (I recall there being a point where one of the JS VMs made decisions based on source text size, so comments could change optimization behaviour).

There's also all sorts of optimizations you have to depend on to avoid excess object allocations, etc.

That said object allocation in JSC and V8 (not sure about spider monkey) is essentially a pointer increment in the common case, so its not exactly expensive.



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

Search: