🏳️Mathias Bynens

Website faviconmathiasbynens.be

Mathias Bynens is a web standards enthusiast currently working on Chrome at Google.

Latest notes

============

[A horrifying `globalThis` polyfill in universal JavaScript](/notes/globalthis)

===============================================================================

Published 18th April 2019 · tagged with [JavaScript](/notes#javascript)

The `globalThis` proposal introduces a unified mechanism to access the so-called “global object” a.k.a. “the global” in any JavaScript environment. It sounds like a simple thing to polyfill, but it turns out it’s pretty hard to get right.

[Continue reading “A horrifying `globalThis` polyfill in universal JavaScript”…](/notes/globalthis "A horrifying globalThis polyfill in universal JavaScript")

[JavaScript engine fundamentals: optimizing prototypes](/notes/prototypes)

==========================================================================

Published 16th August 2018 · tagged with [JavaScript](/notes#javascript), [performance](/notes#performance)

This article explains JavaScript engine optimization pipeline trade-offs, and describes how engines such as V8 speed up accesses to prototype properties. As a JavaScript developer, having a deeper understanding of how JavaScript engines work helps you reason about the performance characteristics of your code.

[Continue reading “JavaScript engine fundamentals: optimizing prototypes”…](/notes/prototypes "JavaScript engine fundamentals: optimizing prototypes")

[JavaScript engine fundamentals: Shapes and Inline Caches](/notes/shapes-ics)

=============================================================================

Published 14th June 2018 · tagged with [JavaScript](/notes#javascript), [performance](/notes#performance)

This article describes some key fundamentals that are common to all JavaScript engines — and not just V8, the engine the authors work on. As a JavaScript developer, having a deeper understanding of how JavaScript engines work helps you reason about the performance characteristics of your code.

[Continue reading “JavaScript engine fundamentals: Shapes and Inline Caches”…](/notes/shapes-ics "JavaScript engine fundamentals: Shapes and Inline Caches")

[Asynchronous stack traces: why `await` beats `Promise#then()`](/notes/async-stack-traces)

==========================================================================================

Published 2nd October 2017 · tagged with [JavaScript](/notes#javascript), [performance](/notes#performance)

Compared to using promises directly, not only can `async` and `await` make code more readable for developers — they enable some interesting optimizations in JavaScript engines, too! This write-up is about one such optimization involving stack traces for asynchronous code.

[Continue reading “Asynchronous stack traces: why `await` beats `Promise#then()`”…](/notes/async-stack-traces "Asynchronous stack traces: why await beats Promise#then()")

[ECMAScript regular expressions are getting better!](/notes/es-regexp-proposals)

================================================================================

Published 25th January 2017 · tagged with [JavaScript](/notes#javascript), [Unicode](/notes#unicode)

This article highlights what’s happening in the world of JavaScript regular expressions **right now**. Spoiler: it’s quite a lot — there are more `RegExp`\-related proposals currently advancing through [the TC39 standardization process](https://tc39.github.io/process-document/) than there have been updates to `RegExp` in the history of ECMAScript!

[Continue reading “ECMAScript regular expressions are getting better!”…](/notes/es-regexp-proposals "ECMAScript regular expressions are getting better!")

Older notes

-----------

[Browse the archive.](/notes)