1
There's Math.random(), and then there's Math.random() (2015)
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 v8.dev → RSS feedOn Hacker News Dec 2018 – Aug 2025
Web & Frontend 11Systems & Performance 10Software Engineering 8Security & Privacy 3Math & Algorithms 1
V8’s Math.random implementation now uses an algorithm called xorshift128+, improving the randomness compared to the old MWC1616 implementation.