Leave a Reply

29 Comments on "Advanced JS performance with V8 and Web Assembly (Chrome Dev Summit 2016)"

Notify of
avatar

alex1zzz
Guest
alex1zzz
5 months 27 days ago

I got "addTwo.wasm" is main magic feature. =)) But how it was coded? o_O I spent ~30 minutes of my time in vain. =((

abel varga
Guest
abel varga
5 months 28 days ago

NSync guy, is that you???

Łukasz Jagodziński (Jagi)
Guest
Łukasz Jagodziński (Jagi)
6 months 19 hours ago

Anyone know what is the name of the tool that he is using for docking windows on mac?

Łukasz Jagodziński (Jagi)
Guest
Łukasz Jagodziński (Jagi)
5 months 28 days ago

+David Chase Thanks!

David Chase
Guest
David Chase
5 months 28 days ago
Kesus Kim
Guest
Kesus Kim
6 months 10 days ago

AWESOME Webassembly 😀

vmbo
Guest
vmbo
6 months 12 days ago
'Use it with no knowledge of how it was created' <– That's actually the part I fear the most about web assembly. I like to know how things were created and learned a lot by simply reading code of websites over the years. The web was getting more semantic and everything is still mostly in a readable state, so this feels like a step backwards. It's basically the part where I feel like we shouldn't sacrifice symantics for performance. Plus, it's not the app developers that will become a problem. Companies that create tools FOR developers will be quick to… Read more »
vadix
Guest
vadix
5 months 21 days ago
Even asm.js is incredibly limiting in terms of online game performance. Even the simplest of games such as sliter.io lag enormously even when doing basic things. It also accounts for much of the bandwidth on pages and is significantly larger than wasm. However, I don't want you to trust me on the performance.For a real world example, try this Unity game build with emscripten in javascript and webassembly: webassembly.org/demo/Note that it was converted from asm.js, and that it has no performance optimizations aside from those made converting to webassembly.If you want to see benchmarks, run them here: kripken.github.io/Massive/beta/index.htmlI recommend trying… Read more »
vmbo
Guest
vmbo
5 months 22 days ago

But performance was never really a big issue any way. You can already run VR cardboard games on your phone browser. This is a business move first, not something that was created for the community or to really push the web forward.

vadix
Guest
vadix
5 months 23 days ago

+vmbo I wouldn't say those things are shady. Also, it is reasonable for them to protect their source. While it might result in some downsides, it will also result in benefits in the form of performance that was previously unachievable. I prefer to make more things possible than limit the possibilities, and this opens the possibilities, so I'm in favor.

vmbo
Guest
vmbo
5 months 24 days ago

No no no no no. It means we're moving away from the open document based web. This will be a new era of the web with closed source clientside apps and everything bad that comes with it. I'm pretty sure most use cases of webassembly won't benefit the web or the users. Let's welcome stuff like DRM, nearly unblockable ads and other shady hidden stuff.Companies will move to webassembly to protect their source.

vadix
Guest
vadix
5 months 24 days ago

+vmbo You will find plenty of open source material and tutorials. It is an advantage to be able to compile the code like this. It doesn't mean you can't learn how to do these things.

Peter Halloran
Guest
Peter Halloran
6 months 9 days ago

+vmbo I wouldn't be so pessimistic, I mean most big websites source code is minified and compressed making it unreadable anyways. Also I am sure most webassembly code not written in C/CPP will probably be written using some ES2015 JS like code/framework which would compile to wasm. Regardless if webassembly or JS any browser code needs to be written around callbacks and events. Most languages aren't designed around this pattern so I assume whatever overtakes JS will be very JS like.

Kesus Kim
Guest
Kesus Kim
6 months 9 days ago

:S For me, even now I can't understand how many websites are made. If they do put proper HTML and CSS and JS, it's easy to understand, but now they put everything into JS, and they normally bundle it. 🙁

vmbo
Guest
vmbo
6 months 9 days ago
That is exactly the problem: (almost) nobody will write WebAssembly, but companies will write their apps in any other language and then compile it to WebAssembly so it is almost impossible to decypher, basically enabling closed source client side apps. The thing that annoys me most is that they're being misleading about the whole thing. They are promoting it as a performance thing (look how fast this game runs) and a useability thing (you can use this module without knowing how it works) instead of showing their true intentions and the honest truth (you will not be able to see… Read more »
Kesus Kim
Guest
Kesus Kim
6 months 9 days ago
Well, I ain't that expert, but I think that if you can do with Pure JS, I think it's perfectly OK to go with it. I remembered some guy said JS is Assembly on the Web(maybe he mentioned it before WebAssembly came out) because every peace of code that runs on the Web will boil down to JS. Of course, now it could be either JS or WebAssembly, but as you can see on 'not Web' side, nowadays, only few will make program with Assembly. Even these days, they do program with Assembly especially performance is sooo critical. I think,… Read more »
vmbo
Guest
vmbo
6 months 9 days ago

+Peter Halloran I'm pretty sure loads of companies and services will just stream assembly code. Will be near impossible to figure out what Google/Facebook/Twitter are doing in the background

Nitin Pasumarthy
Guest
Nitin Pasumarthy
6 months 14 days ago

Any good tutorials on how to create a .wasm file from .c or other popular languages like Python, JAVA?

Nitin Pasumarthy
Guest
Nitin Pasumarthy
6 months 12 days ago

Totally agree. Sorry for not being clear last time. By arguments I meant, the command like arguments for "emcc" compiler :)Could you help me with the complete command which takes a .c file and output a .wasm file using Emscripten.

Nolan Essigmann
Guest
Nolan Essigmann
6 months 12 days ago
Hmm… Given that it's still much much easier (at least for me) to use a dynamic scripting language like javascript to solve 99% of my client side programming problems I'd have to disagree. I don't use js that much though, so maybe performance its a bigger problem than I realize? Like most recent languages it will have a garbage collector (github.com/WebAssembly/design/blob/master/GC.md)! I think that's a really good thing given that people (especially me…) seem to be intrinsically terrible at managing their own memory (it seems like a lot of modern c++ standards/best practices/and new language features basically revolve around this).… Read more »
Nitin Pasumarthy
Guest
Nitin Pasumarthy
6 months 12 days ago

Thank you. I tried Emscripten, but I am able to convert .c to .bc or .o only but not .wasm. Am I missing some arguments?

Nolan Essigmann
Guest
Nolan Essigmann
6 months 12 days ago
There seem to be a number of compiler toolchains, but the most popular looks like Emscripten (+Binaryen ) to go from c/c++ to asm.js to wasm. I don't know if there are compilers for python or java, but in the case of python I think you'd need to also (or instead) compile a python interpreter into wasm in order to actually be able to run any python code (or bytecode). I don't know anything about java, but i'm pretty sure it also needs to run compiled bytecode on a virtual machine just like python 🙁 That being said though, you… Read more »
Raja Shahja
Guest
Raja Shahja
6 months 13 days ago

Popular = Substandard, its people like you who will be killed with WebAssembly since it will be used to kill all 3 i.e. Dynamic, Scripting and Garbage collector Junk.

Paul Martin
Guest
Paul Martin
6 months 17 days ago

was anyone else noticing that he didn't save the file in his demo?

曾学兵
Guest
曾学兵
5 months 26 days ago

I think he had set DevTools Workspaces before he demos.You can learn more detail here.developers.google.com/web/tools/setup/setup-workflow.

Tamás Halasi
Guest
Tamás Halasi
6 months 18 days ago

Why do you use imgs.map instead of imgs.forEach?

Alex Zajac
Guest
Alex Zajac
6 months 17 days ago

I would assume personal preference in this case (I also tend to map more than forEach) but I agree that in this case forEach would have been more readable, like you said.

Tamás Halasi
Guest
Tamás Halasi
6 months 17 days ago

Yes, but in this case he doesn't need chaining (and all of the elements of the imgs array are returning undefined) so it's bad for readability (some people (like me) may expect to get a not-fully-useless array back from that method).

Alex Zajac
Guest
Alex Zajac
6 months 17 days ago

ryanpcmcquen.org/javascript/2015/10/25/map-vs-foreach-vs-for.htmlTL:DR it's easier to chain map() (which will always return an array) vs. chaining forEach()

wpDiscuz