1
There's Math.random(), and then there's Math.random()
V8’s Math.random implementation now uses an algorithm called xorshift128+, improving the randomness compared to the old MWC1616 implementation.
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Visit v8project.blogspot.com → RSS feedOn Hacker News Dec 2015 – Sep 2018
Software Engineering 16Web & Frontend 15Systems & Performance 2Math & Algorithms 2History & Retro Computing 1
V8’s Math.random implementation now uses an algorithm called xorshift128+, improving the randomness compared to the old MWC1616 implementation.
Several JavaScript data structures such as Map, Set, WeakSet, and WeakMap use hash tables under the hood. This article explains how V8 v6.3 improves hash table performance.