Fast JavaScript-to-WASM Call from FTL
github.com
github.com
- 9x faster Array.from({length: N}, map) https://github.com/WebKit/WebKit/pull/2876
- 35% faster Object.entries() https://github.com/WebKit/WebKit/pull/5281
- 4x - 6x faster new Proxy(obj).get https://github.com/WebKit/WebKit/pull/3674
- 1.5x faster “await” https://github.com/WebKit/WebKit/pull/4909
- for (let {destructured} of array) {} gets 2x faster https://github.com/WebKit/WebKit/pull/5477
- 15% faster JS -> WASM calls via better inlining caching https://github.com/WebKit/WebKit/pull/8077
- 2x faster typed array.slice https://github.com/WebKit/WebKit/pull/2694
One thing I don't get, why they call themselves "WebKit reviewer", they've made tons of contributions (of high value) to WebKit, way beyond what I would think a "reviewer" would do.
> A potential Reviewer may be nominated once they have submitted a minimum of 80 good patches. […] A person who submits many patches but does not show good collaboration skills, code understanding or understanding of project policies may never be nominated.
And when someone becomes a WebKit Reviewer, their status is announced publicly under a special tag[2]. My interpretation (I’m happy to be corrected if mistaken) is that this status is essentially maintainer, but perhaps outside the team at Apple.
1: https://webkit.org/commit-and-review-policy/#criteria-for-re...
Similarly Apple employees have to go through the same nomination process to become reviewers, and are subject to the same requirements.
Basically: how can you be an effective reviewer if you aren’t able to write the code as well?
I’m unsure of any project that has otherwise uninvolved folk who are reviewers, and can’t imagine where that would make sense?
Wonder how one can know to find and make these optimizations
Of course for that to be relevant you need to have tests that can actually hit the relevant code paths.
The fastest(hah!) way to get performance of something fixed is to provide a easy to run deterministic and vaguely realistic example where performance is significantly worse in one case vs another. Now that could be one JS engine vs another, but it could also be a piece of JS calling two functions doing the same thing, only one in JS and one in wasm, or say a switch vs a series of if/else