asm.js and webassembly

122 views
Skip to first unread message

Roberto Zanotto

unread,
Sep 12, 2015, 8:33:55 PM9/12/15
to GopherJS
Hi.
Does gopherjs generate code that uses asm.js annotations for integers and floats? Would it make some difference in terms of performance? It looks like even microsoft edge is going to support asm.js soon.
Webassembly is also interesting. It's way too early to talk about a Go to webassembly compiler, but it seems like the web could become THE platform for Go graphical applications in the future.
I'm not requesting any feature, just interested in the discussion :)

Dmitri Shuralyov

unread,
Sep 12, 2015, 11:35:20 PM9/12/15
to GopherJS
Absolutely, this is something we're aware of and excited about.

See https://github.com/gopherjs/gopherjs/issues/72 for existing discussion on the topic.

It's definitely a "priority-later" item, as it's too early to build anything now (at least for GopherJS). But good to keep it on the radar.

I see GopherJS, the existing version, as a proof of concept that allows you to start writing and using Go code for frontend stuff today, and allows you to learn how Go the language fits in (in my experience, it's an absolutely fantastic choice, I prefer it over JavaScript hands down). When you can compile Go to WebAssembly, it will be simply an optimization for the existing Go code you have.

Roberto Zanotto

unread,
Sep 14, 2015, 10:53:48 PM9/14/15
to GopherJS
I agree it's really cool to do frontend stuff in Go, especially because I'm not a fan of callback spaghetti code. I would like to write a Go library for interacting with the DOM that internally relies on React, but I never have free time there days...
Reply all
Reply to author
Forward
0 new messages