having competition is good.
Bun(.js) has demonstrated that JavaScript can run faster than already very fast V8 engine
from Chrome and used in node.js
One of "tricks" is using HW commands usually used for gaming only.
Now V8 has also managed to significantly improve performance.
Useful!
How we made JSON.stringify more than twice as fast · V8
- For longer strings, we switch to dedicated hardware SIMD instructions (e.g., ARM64 Neon). This allows us to load a much larger chunk of the string into a wide SIMD register and check multiple bytes for any escapable characters at once in just a few instructions. (source)
- For shorter strings, where the setup cost of hardware instructions would be too high, we use a technique called SWAR (SIMD Within A Register). This approach uses clever bitwise logic on standard
No comments:
Post a Comment