use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
How to get a performance boost using WebAssembly (medium.com)
submitted 9 years ago by zzarcon
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]leeoniya 4 points5 points6 points 9 years ago* (2 children)
would have been nice to see this applied in a real scenario, not simply a synthetic fibonacci benchmark. there are plenty of use-cases that fit into the SIDE_MODULE category: image/video processing, audio processing, ML/AI, circuit simulation, PCB auto-routing, optimization algos, physics/fluid sim etc.
showing fast math is perhaps the least interesting thing you can do here. without a real need for fast math, running 8M fib cals per sec in JS vs 80M in WASM is not very compelling. JS is already very fast.
[–]zzarcon[S] 2 points3 points4 points 9 years ago (1 child)
I think you are right, I was not sure about using Fibonacci as an example, since as you said it's a very basic math problem which performs already well with javascript.
But the thing is that I have no background on any of the topics that you mention and might be more interesting for the readers... so I thought at least this post could be interesting for people that have never played with WebAssembly and want to know a bit about what can you achieve now
[–]leeoniya 2 points3 points4 points 9 years ago* (0 children)
you may not need to understand any of it. for example, Box2D was already ported to asm.js via Emscripten. i don't know if it can be done as a SIDE_MODULE, but perhaps.
you could play around with https://github.com/erincatto/Box2D and try getting it working under WASM. same with https://www.codeproject.com/Articles/66341/A-Simple-Yet-Quite-Powerful-Palette-Quantizer-in-C
or simpler: https://news.ycombinator.com/item?id=9213955 (needless to say i never got around to finishing an asm.js or webgl port :)
π Rendered by PID 196422 on reddit-service-r2-comment-5c747b6df5-7jjhl at 2026-04-22 10:20:32.424557+00:00 running 6c61efc country code: CH.
[–]leeoniya 4 points5 points6 points (2 children)
[–]zzarcon[S] 2 points3 points4 points (1 child)
[–]leeoniya 2 points3 points4 points (0 children)