how fast is javascript simulating 20 000 000 particles
The challenge, simulate 1,000,000 particles in plain javascript at 60 fps on a phone using only the cpu. Let’s go. Ok, this is not a particularly difficult challenge if you did all the work on a gpu but the rule of the challenge is to use the CPU only or as much as possible and to stay in js land so no wasm. I know what you are thinking. This isn’t too hard. Just create an array and stick a million objects in it. Something like this maybe? Then you would just loop over your particles with something like this And assuming this is on a browser just toss that in a request animation frame with a canvas for rendering Now, this may be enough if you have a single fast cpu but mobile devices are not known for their single core performance. They have many small power efficient cores. And to hit the target, one million particles, I need to get as they say What is the fastest, most stablest, and predictable way of doing lots and lots of computations in any programming language? Tightly packed con
How fast is javascript? Simulating 20,000,000 particles Home / blog How fast is javascript? Simulating 20,000,000 particles The challenge, simulate 1,000,000 particles in plain javascript at 60 fps on a phone using only the cpu. Let's go. Ok, this is not a particularly difficult challenge if you did all the work on a gpu but the rule of the challenge is to use the CPU only or as much as possible and to stay in js land so no wasm. I know what you are thinking. This isn't too hard. Just create an array and stick a million objects in it. Something like this maybe? const count = 1 _000_000; const
Explore this link on the map →related reading
- Speeding Up the Webcola Graph Viz Library with Rust + WebAssembly - Casey Primozic's Homepagecprimozic.net
- Teaching GPU programming in p5.js: now with compute shaders - Dave Pagurekdavepagurek.com
- diffuse.onediffuse.one
- Populating the page: how browsers work - Performance | MDNdeveloper.mozilla.org
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- Inside look at modern web browser (part 1) | Blog | Chrome for Developersdeveloper.chrome.com
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- Linux in a Pixel Shader - A RISC-V Emulator for VRChatblog.pimaker.at
- Exploring Million.js, a high-performance web frameworkblog.openreplay.com
- There's nothing to watchnothing-to-watch.port80.ch
- siboehmsiboehm.com
- Thousands of Styled Rectangles in 120FPS on GPU - tchayen.comtchayen.com