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

The TL;DR: is that non-hot code will run slower (it looks like about 1.5 to 2 times slower) with the benefit of reducing the code-space to about 25% of it's current size. (saving any memory usage that would have been used by that)

"Hot" or optimizable code will still be optimized and run just as fast.




What portion of a "standard" web site (say, Google search) is hot vs non-hot ?


The specifics of this are a bit outside my knowledge area, so take this with a few major grains of salt.

But basically V8 has tools built in that will decide when the cost of compiling is worth the possible benefit.

So the AJAX submission javascript will probably never hit the optimizing compiler, but your function inside 3 nested loops will probably be hit ASAP.


Thanks :)


Kind of hilarious that we're worried about code size in browsers these days.


It's not disk size that we care about, it's memory size. Reducing the space that the "parsed" code takes up in memory will reduce the amount of memory used by the engine.


> It's not disk size that we care about, it's memory size.

Yeah, I get it. We have a lot of memory these days. Gigabytes. Not always enough for images and videos, but for code? for client-side browser code that is downloaded & run on the fly? Makes you wonder how we got there.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: