Open drom opened 7 years ago
There is unfinished https://github.com/devongovett/glsl.js which attempted that. Practically there are cases where we use Array.prototype.map and other env methods. Not sure that goes well with asm.js. Should understand that main performance drop is not because of suboptimal js, but due to absence of huge parallelism, like in GPU.
@dfcreative agree, that the main performance drop is because of CPU is not GPU, but 2x average improvement maybe worth pursuing. Here is my comparison of asm / non-asm version of FFT: https://github.com/drom/fourier/issues/1
Interesting! Would be nice to make comparative benchmark over various implementations As for glsl-transpiler, I am not sure there is anyone using it at all before making any serious changes. Because webgl is too well supported across all platforms.
@dfcreative I see that my package is already in the list ;)
@drom your benchmarks are way more dependable and demonstrative :)
@dfcreative I need to rerun it with node v6 / v7 There is some difference depend on the engine.
mmh but what about WebAssembly? 🙂 I agree there is not much room for a real usecase (webgl is widely supported now!) but it would be fun just for the exercise of learning WebAssembly
@gre I am watching for the WebAssembly area, do you have any easy getting-started resources by any chance? Seems like entry barrier is too expensive for ordinary js-developer
yeah I don't have A LOT of experience in it frankly, but i've found these series of article quite interesting: https://hacks.mozilla.org/2017/02/a-cartoon-intro-to-webassembly/
I've been learning and implement WASM the past week or so for Elixir. It has been quite fun! My main resource so far has just been everything Web Assembly has put out.
What I can say from my limited experience: The spec only describes a few basic values, some instructions for working with them, and a module format to define the program and reusability. There is some typing aspect to it, and also validation, but I haven't delved that deep myself.
It does seem to be quite early though and still active in development (the binary format wasn't in the spec when I first started investigating!) so it is probably worth watching the repos to see that discussion. Note that they have several repos dedicated to sections of the spec like webassembly/gc for garbage collection, and so on.
Hope this helps and I hope to collab on some WASM stuff with people!
asm.js: http://asmjs.org/spec/latest/ Is supported chrome and firefox for quite some time. Does it make sense generate it?