Jan de Mooij

Engineer at @mozilla, working on the @SpiderMonkey JavaScript engine.

Jan de Mooijjandem
2025-05-15

We found an Apple Silicon CPU issue with FJCVTZS, the "JS-compatible double-to-int32 conversion" instruction that was added to ARMv8.3.

If the Flush-to-Zero flag is set in the FPCR register and FJCVTZS is used with a denormal, my M1 sets the Zero flag to 1 and M2-M4 CPUs set it to 0. This flag indicates whether the conversion was exact. I believe M1 is correct?

Test case: gist.github.com/jandem/e6b5660

Jan de Mooijjandem
2025-04-28

@redfire What's nice about jj is that it works very well with git repos so we don't really need that. Even jj itself is developed on GitHub :)

Jan de Mooijjandem
2025-04-28

With the Firefox hg => git migration happening on Wednesday, I just want to mention that Jujutsu (jj) is a very good git-compatible alternative to both Mercurial and Git. I've been using it for mozilla-central work since January after 15 years of Mercurial.

There's a growing community of users at Mozilla and it's been great for finding and fixing problems :)

Jan de Mooij boosted:
2025-04-14

Exciting news: we're shipping Temporal in Firefox 139! Temporal is a new API for working with dates and times in JS.

This is a very large feature and our implementation was contributed by a single volunteer.

Read about it in our blog post: spidermonkey.dev/blog/2025/04/

Jan de Mooij boosted:
2025-04-14

We just published my blog post about the recent work on hardening the #Firefox frontend against attacks we have seen demonstrated during #Pwn2Own.

attackanddefense.dev/2025/04/0

Jan de Mooijjandem
2025-01-23

@mgaudet @mconley I'm also very happy with Fastmail. I moved there 5+ years ago.

Jan de Mooijjandem
2024-11-30

@evilpie NOELreports (@noelreports) is covering Syria atm. Some large accounts I followed on Twitter post on Bluesky now.

Jan de Mooijjandem
2024-10-18

@irogers Hi, thanks for the suggestion! I'll take a look at this in the coming days.

Note that our allocator uses backtracking with a priority queue to assign (bundles of) live ranges to registers.

Also CC @cfallin

Jan de Mooijjandem
2024-10-17

@TomF @mgaudet It was more about not requiring the lists to be sorted all the time :) We now sort the vector once instead of slow linear insertions in a linked list to keep it sorted at all times.

But better cache locality is great too!

Jan de Mooijjandem
2024-10-17

@oblomov @mgaudet Thanks!

Only optimizing warm functions is what we're already doing for JS too.

Wasm is becoming more dynamic with newer features such as Wasm GC, so engines are slowly moving from full AOT (ahead of time) compilation to JIT compilation.

Jan de Mooijjandem
2024-10-17

@cfallin @mgaudet Thanks for the pointers. I might look into this if regalloc time is an issue again.

The allocator is surprisingly fast though if you don't have quadratic loops :)

Jan de Mooijjandem
2024-10-16

@cfallin @mgaudet Btw I read about your fixpoint loop for liveness analysis. Was this to improve compile time or code quality? Or both?

I'm wondering if this is worth looking into if it helps compilation time...

Jan de Mooijjandem
2024-10-16

@cfallin @mgaudet One area we need to work on at some point is the splitting heuristics. Our allocator isn't great at this and I think we should probably just follow the work you did for Cranelift.

Ideally we'd just use regalloc2 directly but that's a much bigger project.

Jan de Mooijjandem
2024-10-16

@cfallin @mgaudet The loop for moves within a block didn't need the linear lookup if we track the "longest" register and non-register ranges.

For moves at block edges, we collect the edges in a vector, sort that, then iterate over both the ranges and edges. I think this is similar in spirit to the half-moves.

The loop I didn't optimize yet is for resolving phis. That one is more complicated because it involves multiple vregs at a time. I haven't seen this one much in profiles though.

Jan de Mooij boosted:
2024-10-16

How often do you get a 75x speedup on a real workload in a compiler? Not often!

Here's the story of one in SpiderMonkey: spidermonkey.dev/blog/2024/10/

Jan de Mooijjandem
2024-07-08

@evilpie SpiderMonkey too.

Jan de Mooij boosted:
2023-11-01

This year a lot of work has gone into improving SpiderMonkey and Firefox performance, and we're happy to see this result in significant speed improvements for Firefox users! 🎉 Read all about it in this article:

hacks.mozilla.org/2023/10/down

#Firefox #SpiderMonkey #performance

Jan de Mooij boosted:
2023-02-16

We are a little late to the party. How about we do an ?

Hi Fediverse, we are SpiderMonkey, @mozilla’s engine for and .
SpiderMonkey is used in Firefox, Servo and various other projects.

This account is run by our engineers, and none of us know how social media works. We were told to use hashtags.

Nice to meet you!

Jan de Mooij boosted:
2022-11-18

6,931,140 accounts
+13,313 in the last hour
+75,446 in the last day
+430,755 in the last week

Jan de Mooijjandem
2022-11-17

@freddy for the SpiderMonkey newsletters I use the "Docs to Markdown" add-on for GDocs. Two clicks to generate markdown and works pretty well. (IIRC I couldn't install this for my Mozilla account but works with my personal one.)

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst