Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WASM as the target? #31

Open
drom opened this issue Nov 5, 2016 · 12 comments
Open

Use WASM as the target? #31

drom opened this issue Nov 5, 2016 · 12 comments

Comments

@drom
Copy link

drom commented Nov 5, 2016

asm.js: http://asmjs.org/spec/latest/
Is supported chrome and firefox for quite some time.
Does it make sense generate it?

@dy
Copy link
Member

dy commented Nov 5, 2016

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.

@drom
Copy link
Author

drom commented Nov 6, 2016

@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:
drom/fourier#1

@dy
Copy link
Member

dy commented Nov 6, 2016

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.

@drom
Copy link
Author

drom commented Nov 6, 2016

@dfcreative I see that my package is already in the list ;)

@dy
Copy link
Member

dy commented Nov 6, 2016

@drom your benchmarks are way more dependable and demonstrative :)

@drom
Copy link
Author

drom commented Nov 6, 2016

@dfcreative I need to rerun it with node v6 / v7
There is some difference depend on the engine.

@gre
Copy link
Member

gre commented May 27, 2017

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

@dy
Copy link
Member

dy commented May 27, 2017

@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

@gre
Copy link
Member

gre commented May 27, 2017

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/

@dy
Copy link
Member

dy commented May 28, 2017

@gre as far as I get this, wasm can be compiled from asm.js via wasm.

@jamen
Copy link
Contributor

jamen commented May 28, 2017

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!

@dy dy changed the title Use ASM.JS as the target Use WASM as the target? Jul 20, 2023
@dy
Copy link
Member

dy commented Jul 20, 2023

Can be done via lino, which can be a better fit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants