Faster Vue.js Execution in Firefox (hacks.mozilla.org)
from tedu to webdev on 06 Sep 2023 04:41
https://azorius.net/g/webdev/p/1G46zG7YV3tz3lctDp-Faster-Vuejs-Execution-in-Firefox

Proxies are hard to optimize because they’re generic by design and can behave in all sorts of surprising ways (e.g., modifying trap functions after initialization, or wrapping a Proxy with another Proxy). They also weren’t used much on the performance-critical path when they were introduced, so we focused primarily on correctness in the original implementation.

Speedometer 3 developed evidence that some Proxies today are well-behaved, critical-path, and widely-used. So we optimized these to execute completely in the JIT — specializing for the shapes of the Proxies encountered at the call-site and avoiding redundant work. This makes reactivity in Vue.js significantly faster, and we also anticipate improvements on other workloads.

#browser #firefox #javascript #webdev

threaded - newest