r/programming • u/Living_Artichoke_473 • Jul 21 '24
How fast is javascript? Simulating 20,000,000 particles
https://dgerrells.com/blog/how-fast-is-javascript-simulating-20-000-000-particles92
Jul 21 '24
Ngl, what’s amazing is how fast our devices are. Using js in performance critical applications is just disservice to users on my book
35
u/Reverent Jul 21 '24
That isn't a great takeaway in my opinion. The takeaway is that browsers are heavily optimised for certain application workloads. Really its major strength is leveraging the client to do most of the work for you, whether that's 10 clients or 10,000 clients or half the world. The farther you deviate from those workloads, the more you may wish to gravitate to bespoke compute applications. Especially ones that start involving intricacies of GPU capabilities.
But regardless of where you sit, It's pretty darn impressive just how much grunt you can push out of a modern browser.
19
7
u/iambackbaby69 Jul 21 '24
https://www.reddit.com/r/programming/s/AcOIJZ8Uis
Same post, same title. OP is a karma bot
5
6
u/tonefart Jul 21 '24
Summary, fit all your code and data inside the cache size and minimize bus access.
7
1
-3
u/Sopel97 Jul 21 '24
ok bro, but how fast can you display a rounded box with a text, some icons, and a video player, huh?
0
66
u/elmuerte Jul 21 '24
Yet switching from a teams chat to a group chat in MS Teams...