Live data from Hacker News

The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

hacks.mozilla.org

41–50 of 281 posts

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

#41
post #19

Awesome. I love the direction Firefox is heading now that Chrome is a pain to use.

In what way is Chrome currently "a pain to use"?

It's at least "100% more evil" than other browsers.

Google doesn't need to plaster the world with Google Analytics if it can get most people to use a browser that phones home.

From around the time of the Windows 8 transition I used Microsoft Edge as much as possible. Firefox was at a low ebb then.

I switched back to Firefox when Microsoft announced it would use the Chromium rendering engine for Edge. At that point Firefox had improved performance a lot and I've mostly been happy with it.

The minus of it however is that many developers are choosing to only support Chrome. For instance I worked at a company that had developed a data analysis tool with a React front end and it didn't work with either Firefox or Edge (or Safari) so I had to install Chrome for work. I don't think there was a deep technical reason why that was, but rather they did not want to go through the effort to test on other browsers. Our customers weren't clamoring for wider browser compatibility so that was OK for the business.

From time to time I find public web pages that have problems w/ Firefox, although more frequently I find pages that don't like it that I block ads at the "hosts" level. Some sites now use trackers as part of the authentication/anti-fraud process and that can be a problem.

Believe it or not I hardly ever log into Google. I have a gmail account that I barely use, but when i do I IMAP into it with em client. I am really done with Adsense, Adwords, Analytics, and all that. If I am working for somebody that is using Google services I will use it, but otherwise I can go a month or two w/o logging into Google.

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

#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.

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

#43

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, Youtube can send my fan into a frenzy and Docs is also regularly problematic.

It seems to work fine on my system running Ubuntu 18.04 with ublock origin installed. Which OS are you using?

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

#44

Awesome. I love the direction Firefox is heading now that Chrome is a pain to use.

I was perfectly fine with Chrome's usability until I started getting a `Hold Command + Q` to quit` prompt on my Mac. Before then, I hadn't even considered the possibility that an application could block me from quickly and easily quitting out of it. Now I have to hold the key combo or double tap it to quit Chrome, and it is the only application I have to do that for. It's so annoying.

Ironically, I love that feature and wish I could have it on my other apps, especially on Firefox.

I've fat fingered Cmd-W and Cmd-Q too many times, and while it's easy to restore, it takes a couple minutes, a lot of bandwidth, and spins the CPU to 100% for a while. Which really sucks when you're on battery.

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

#45
post #19

Awesome. I love the direction Firefox is heading now that Chrome is a pain to use.

In what way is Chrome currently "a pain to use"?

Chrome regularly tries to trick me into logging into my Google account via Chrome. If you try to disable this functionality, updates will include new dark patterns to trick you into logging in anyway. Now if I log into any Google service, Chrome will magically log into my Google account, too. When I open Chrome, I'm greeted with a new tab with a login screen for my Google account.

I don't want to have mess with a bunch of settings just to turn off anti-user features and tracking. I am willing to mess with a bunch of settings if it enhances the functionality of the application I'm using.

Open 'about:config' in Firefox and look at all of the ways Firefox's behavior can be configured. I run my own Firefox Sync instance, because Firefox is just that customizable. Google regularly removes customization options from Chrome. I used to be able to Cast non-HTTPS resources from Chrome, then I had to enable a setting buried in its experimental features to do so. Now the feature is "enabled" in the settings, but after Chrome auto-updated a few times, the feature doesn't work at all.

I can no longer install Chrome extensions from GitHub, even though I could a few weeks ago. Google decides to take extensions off of their Chrome Web Store, and then make it difficult to use extensions they don't approve of.

Firefox uses less memory and CPU than Chrome does, I'm on a MacBook, so anything that unnecessarily drains my battery is a pain to use.

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

#46

Earlier quoted context omitted.

Yea, because Google surely will implement and fast track new privacy measures on V8, instead of fill any initiative on this regard in a lot of red tape...

It's a JavaScript interpreter. What privacy features did you have in mind?

For example, closing subtle interpreter patterns or behavior differences that may be used to fingerprinting...

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

#47

One thing that wasn't clear to me from this post is why they still need the C++ interpreter at all. I assume there is some non-obvious cost that makes it not worth it for the coldest of code, but I'm having a hard time guessing what it may be.

Basically two reasons:

A lot of code is run once, so the initial compilation cost is potentially more expensive than just the process of compilation, without even running the generated code, and if not that then compilation+execution is also longer than just interpreting.

There are also benefits for performance. If you haven’t run any of the code yet (through the interpreter), the baseline portion of the JIT has no knowledge of the code that is running, and so has to make a bunch of static guesses and (if you look at the old baseline JIT in JSC) include a lot of code for various common cases that may happen. Eg in the JSC case every arithmetic op include the entire code for both integer and floating point arithmetic inline. That bites you in a few ways: the guessing type info means that you have poorly chosen branch ordering (eg you put integer logic in the middle of the “fast” path for something that is floating point), and you simply generate more code which itself takes more time to produce, and also results in increased icache pressure which hurts runtime performance.

I haven’t read the entire article yet, but the JSC interpreter is written in a pseudo assembly so it can do an on stack replacement to switch into jotted code more or less anywhere during execution as the wonders of assembly means you can guarantee identical layout.

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

#48

Awesome. I love the direction Firefox is heading now that Chrome is a pain to use.

I was perfectly fine with Chrome's usability until I started getting a `Hold Command + Q` to quit` prompt on my Mac. Before then, I hadn't even considered the possibility that an application could block me from quickly and easily quitting out of it. Now I have to hold the key combo or double tap it to quit Chrome, and it is the only application I have to do that for. It's so annoying.

Honestly as much as I dislike chrome the “hold cmd q” behavior has saved me many times and I kind of wish safari did it: cmd-q and cmd-w are very close to each other :)

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

#49

I can't help but think that regardless what different browser vendors do there's no competition with v8. Like any language there is a standard library, or environment around it. V8 is to JavaScript what CPython is to python. At least in python you can use other versions and it's a very similiar environment. But if you want to use mozillas spidermonkey without Firefox, it's hoops and bounds worse experience. I'd argue…

Uhhh what? JSC beats v8 across a wide variety of code, and has stable ABI so you don’t have to have N different copies of the entire implementation across every app.

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

#50
post #40
post #16

Earlier quoted context omitted.

V8 did this a while ago.

As far as I know V8 has a generated interpreter and an optimizing JIT (Turbofan). In Firefox we now have a generated interpreter + a Baseline JIT on top of a mostly shared code base. I think that's a pretty nice design/advantage.

[deleted]
Post reply on HN