Hacker News new | ask | show | jobs
by throw93232 1440 days ago
It seems disabling JIT on JS VM and only using slow interpreted mode is a good choice.
3 comments

On the V8 teram we had a POC of forcing mispredicted instruction sequences in the interpreter that leaked data. Reorder buffers are 200-600 instructions these days, and indirect branch predictors needed to speculate through bytecode sequences are good enough that an interpreter is not safe.
is it possible to disable JIT on chrome or Firefox?
I found this blog post for chrome/FF: https://lemmy.eus/post/7660

And Edge has so-called "Super Duper Secure Mode": https://microsoftedge.github.io/edgevr/posts/Super-Duper-Sec...

Edge's newer "Enhanced Security"[1] toggles are essentially that, disabling JIT and WebAssembly (alongside other features) on sites you don't frequent. "Strict" disables them on all sites.

1: https://support.microsoft.com/en-us/microsoft-edge/enhance-y...

Also in this case memory consumption will be lower because JIT'ed code takes space. I think that it is a good idea.
Has anyone produced meaningful benchmarks on real world websites? If I go to arstechnica, or NYTimes, or gmail — what will the difference be between JIT and non-JIT for page load and common operations?
Edge did some benchmarks with their "Super Duper Secure Mode" and found that disabling JIT improves performance more often than not: https://microsoftedge.github.io/edgevr/posts/Super-Duper-Sec...
> and found that disabling JIT improves performance more often than not

Well, kind of...

>> We find that disabling the JIT does not always have negative impacts. Our tests that measured improvements in power showed 15% improvement on average and our regressions showed around 11% increase in power consumption. Memory is also a mixed story with negatively impacted tests showing a 2.3% regression, but a larger gain on the tests that showed improvements. Page Load times show the most severe decrease with tests that show regressions averaging around 17%. Startup times, however, have only a positive impact and no regressions.

Most people are going to care about page load times more than anything else by far, and that's the one that quite clearly took a hit without JIT. It's great that no JIT makes Edge open faster, but how many times a day do you have to quit and restart your browser?