Live data from Hacker News

The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

hacks.mozilla.org

191–200 of 281 posts

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#191

Earlier quoted context omitted.

Baseline interpreter is a good example of doing things that help most Web pages instead of benchmarks. One of the major things that ARES-6 and other benchmarks test is whether generators are JIT'd, for example. This doesn't really help Web pages, as it's a rarely used feature at present and even rarer in hot loops. SpiderMonkey should get around to jitting generators, but I have a hard time blaming the team for focus…

JSC's async-await is constructed on the generator's mechanism so that high performance generator is critical for all the web code using async functions. Not sure how SpiderMonkey is doing.

As the gp said, async/await is rarely used in hot loops, so it would probably never get jit-ed in a real webpage.

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#192
I'm seeing a lot of people saying gmail and youtube are slow in Firefox. This may not sound like a good answer, but consider using a dedicated video player such as mpv for youtube, and an email client instead of webmail.

Web browsers are some of the worst-performing software we have today. Asking them to do more than display documents and web pages never seems to go well.

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#193

The Mozilla tech blogs are always a good read. Informative and easy to digest. I can only think of one other company blogging with similar consistency/quality: Cloudflare. Firefox performance has seen tremendous gains since their Project Quantum efforts. It mostly feels on par with Chrome for me pretty much everywhere. There is one glaring omission though: a single company where I have problems with FF on multiple ap…

> Gmail was still dog-slow the last time I tried

I use the HTML version instead to deal with this issue

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#194
post #42

The Mozilla tech blogs are always a good read. Informative and easy to digest. I can only think of one other company blogging with similar consistency/quality: Cloudflare. Firefox performance has seen tremendous gains since their Project Quantum efforts. It mostly feels on par with Chrome for me pretty much everywhere. There is one glaring omission though: a single company where I have problems with FF on multiple ap…

I solve this by using Firefox for all web browsing, and Chrome for gmail/gapps/anything by google. It sucks that we have to do that, but I can't entirely blame them for making their own products work better on their own browser.

Just like you can't blame Microsoft for making ActiveX work best on Windows.

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#195

Earlier quoted context omitted.

> Hundreds of millions in revenue and probably < 0.5% of it due to its linux userbase?

It's not that they have huge userbase lately, so they could afford to lose it any further.

What would you consider a huge userbase?

Firefox has 230 million monthly users, using FF for an average of over 5 hours per day.

https://data.firefox.com/dashboard/user-activity

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#196
The idea of generating an interpreter from the compiler is really neat.

What I missed in this article is why the Baseline Interpreter is faster than the C++ interpreter. The code snippet for the load zero instruction looks like what a compiler should produce for a straightforward C++ switch case for that instruction. Except that the code uses a push instruction to store the value directly on the system stack, whereas the C++ interpreter would presumably use a more general store instruction into an array (in the heap, maybe) treated as the interpreter stack.

Is that the difference, or am I missing something else?

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#197

The Mozilla tech blogs are always a good read. Informative and easy to digest. I can only think of one other company blogging with similar consistency/quality: Cloudflare. Firefox performance has seen tremendous gains since their Project Quantum efforts. It mostly feels on par with Chrome for me pretty much everywhere. There is one glaring omission though: a single company where I have problems with FF on multiple ap…

Gmail is really crazy slow on Firefox, it’s such a deal breaker. I have regularly 30s to load the web application, it’s closer to 2-5s on Edge with the same setup (same ad blockers, etc).

That has to be something wrong with your PC, it only takes a few seconds on even my 6 year old laptop on Firefox to load up from zero. Switching between folders is under a second as is opening an email. Firefox (latest Ubuntu)

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#198
post #13

Javascript engines gave up on interpreters too quickly. JITs have been a huge source of security holes, and the language is so huge now that verifying the correctness of JS optimizations is extremely hard. JS was never meant to be a high performance language. Plus all the heroic work on exotic optimization has just resulted in induced demand. Web pages have just grown to contain so much Javascript that they're even s…

Pandora's box has been opened so what you say is not going to happen, ever. Get used to it, JIT javascript is not going away anytime soon

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#199

Earlier quoted context omitted.

You mean the ones google is fighting to keep, while trying to convince everyone that allowing more tracking would incentive bad actors to drop fingerprinting ?

Where did you learn that? My understanding is that they like cookies and don't like fingerprinting.

You just repeated that dude's last comment. I think you need to read it again.

Re: The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

#200

The idea of generating an interpreter from the compiler is really neat. What I missed in this article is why the Baseline Interpreter is faster than the C++ interpreter. The code snippet for the load zero instruction looks like what a compiler should produce for a straightforward C++ switch case for that instruction. Except that the code uses a push instruction to store the value directly on the system stack, whereas…

The article called it a threaded interpreter, the answer to this question explains what that usually means and why it it faster: https://stackoverflow.com/questions/3848343/decode-and-dispa...

I found the explanation of what they're doing a little unclear though and it seems they might not be doing exactly what is described in the answer above.

Post reply on HN