Live data from Hacker News

The Baseline Interpreter: A Faster JavaScript Interpreter in Firefox 70

hacks.mozilla.org

111–120 of 281 posts

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

#111

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 wanted to keep using FF despite being a gmail user so much so that I switched to Thunderbird for my emails. I guess Mozilla wins this way.

I did the same and then ditched gmail for payed email service + my domain.

Thumderbird is underrated.

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

#112

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…

Diversity and multiple implementations are essential for the web IMO. V8/Blink/Chromium are not independent community projects, but firmly in the hands of Google. Chromium being the only viable implementation would put too much control in the hands of a single company (regardless of which company that is, Firefox being the only implementation would be just as bad). It's redundant effort, but it also enforces consensu…

Also a much slower one - on PDFTron's benchmark, WASM is half as fast as PNacl for me: https://www.pdftron.com/benchmarks/pnacl-vs-wasm/.

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

#113

Earlier quoted context omitted.

> Browser vendors should agree to make JS slow and safe again Not gonna happen. There's one browser vendor in particular who has 2/3 of the browser market, 96% of the ad network market, 87% of mobile, and a similar lock on online office software, email, mapping/navigation, etc. etc. They have every incentive to use their commanding service in providing both the services and the means of access to those services to co…

And driving to make JS that good themselves got them there.

[deleted]

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

#114
> Baseline JIT compilation is fast, but modern web applications like Google Docs or Gmail execute so much JavaScript code that we could spend quite some time in the Baseline compiler, compiling thousands of functions.

Good read. The above mentioned web apps are my biggest pain point at the moment with Firefox. I still use Gmail in Firefox, but it's much slower than running it on chromium. I just accept that, since Google makes all of that.

However, with Google Docs I actually switch over to a chromium browser, even the new Edge beta, because it is simply too slow in Firefox.

It looks like they've taken notice of that and are tackling it head on. Excellent work!

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

#115

Earlier quoted context omitted.

To be fair i think this is an exercize in vanity and why not say it, stupidity. Javascript VM´s these days are fairly complex beasts with huge amount of man-hour and expertise. Also technically this would be a inferior solution as compared to what V8 did with its interpreter in Turbofan (and SpiderMonkey are doing now as presented in the article), by generating pure assembly through the turbofan backend (the same tec…

There's already a JIT for JS coded in Rust: https://blog.mozilla.org/javascript/2017/10/20/holyjit-a-new... The overall goal is to have Firefox recoded in Rust, why would a JavaScript interpreter be left out? https://wiki.mozilla.org/Oxidation That's the whole point of Oxidation.

Of course they can do it. I just dont think is a clever move for them to do it.

Firefox is having a hard time to compete with Chrome, and they took too long pursuing other goals, and just remembering one key feature they took a lot of time to implement, was making Firefox a the multi-process browser as Chrome.

I mean, you would be ditching all this effort, rewriting it in Rust, spending key resources only to have some parity with the same browser you already had in C++, spending years, and loosing more market share, as Chrome can spend this time in optimization and features.

For the record, i think Rust is what will save Mozilla, but it must reinvent itself. Do the best they can with the firefox codebase they have, and use Rust for new projects.

Like, creating Cloud, backend system software, and reinvent itself like Ubuntu is doing right now.

They have to be very strategic and pragmatic right now. Two big moonshots, Firefox OS and Rust, and only one of them has paid out their time and resources.

If they want to bet in more moonshots, great, but they must do it in "blue ocean" places, being more innovative on where they should use Rust, were Rust can shine.

I just think that from a strategic (and even technical) point of view, they are just spending precious resources, while at the same time eroding even more their browser market share.

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

#116
post #73

Earlier quoted context omitted.

I have the opposite experience with YouTube. With an AMD GPU on Linux, Chrome churns, drops frames, and stutters horribly on even 1080p videos at 30fps. Firefox, meanwhile, handles 1440p60 video with no problem. Even two such videos simultaneously, on separate monitors. Chrome became inexplicably better for parts of early 2019 (I did not note which versions), but starting 2 or 3 months ago Chrome returned to being un…

have you double checked whether firefox is set to use your gpu or not, for video?

Neither Firefox nor Chrome under Linux are capable of using GPU for video decoding.

Only some distribution-specific Chromium builds do.

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

#117

Earlier quoted context omitted.

It uses the GPU but doesn't use it to actually decode video on linux. https://bugzilla.mozilla.org/show_bug.cgi?id=1210726 Bug opened 4 years ago. Hundreds of millions in revenue and can't task one person for a summer to hook into the support that already exists.

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

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

#118
post #93

Earlier quoted context omitted.

And that would probably amount to a "bailout". I'm only talking about providing hints that can be used to skip parts of the described process, not getting rid of it altogether.

i always wondered why it wasn't possible to use a js app in "record" mode and then export any witnessed type & profiling information from the JIT and deliver it alongside the source (like a sourcemap).

That might be considered an example of profile-guided optimization: https://en.wikipedia.org/wiki/Profile-guided_optimization

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

#119
post #73

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 have the opposite experience with YouTube. With an AMD GPU on Linux, Chrome churns, drops frames, and stutters horribly on even 1080p videos at 30fps. Firefox, meanwhile, handles 1440p60 video with no problem. Even two such videos simultaneously, on separate monitors. Chrome became inexplicably better for parts of early 2019 (I did not note which versions), but starting 2 or 3 months ago Chrome returned to being un…

When chrome slows down for me, it normally means I need to run clear browsing history, delete cookies, cache, logins, etc. I have modern hardware, on both linux/windows same issue.

But using res on reddit and click "show images" you can tell chrome isn't as fast as other browsers, firefox/brave are visually faster/smoother in scrolling with pics. Hell, even firefox focus is faster on android. But I like chrome addons and sync with my mobile, its my daily driver. Normally I never notice, but a quick clean if starts acting out fixes it for me.

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

#120
post #42

Earlier quoted context omitted.

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.

> 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. You mean like MS for a long time did with MSIE? Are we really back in the 90s, back to “This page works best in $one_specific_browser”? This is not the future I was hoping for... On the flip side I can use Linux for almost anything, so i guess it’s not all bad.

Well .. consider you are back in the 90s ... would you think in general, that this is "the future you was hoping for..."?
Post reply on HN