Live data from Hacker News

WebAssembly: Mozilla Won

robert.ocallahan.org

71–80 of 375 posts

Re: WebAssembly: Mozilla Won

#71

It's worth pointing out that Mozilla can only continue to put pressure on Google and fight for the open web if people continue to use Firefox and support them. Consider switching to Firefox even if you prefer Chrome. Report websites that don't support FF. We are all better off for the existence of Mozilla, and strong viable competition to Chrome and IE.

> Consider switching to Firefox even if you prefer Chrome.

I have given Firefox plenty of chances. It's just too slow: webpages load slower, and when they are loaded interactions feel awful (low FPS on large webapps).

Re: WebAssembly: Mozilla Won

#72
post #56

What are the main benefits of WebAssembly over asm.js? I understand that asm.js was a subset of JavaScript that allowed the compiler to create faster code. For example because it could be sure that variable types do not change during runtime. But what do we gain with WebAssembly? Faster download+compilation times? How much faster?

Here's a good overview from the emscripten author: https://hacks.mozilla.org/2017/03/why-webassembly-is-faster-...

TL;DR: much faster parsing over asm.js (10x to 20x faster), parsing should also use much less memory, 10%..20% smaller downloads (when comparing the compressed sizes, uncompressed WASM is several times smaller then asm.js), 64-bit integers (these have to be emulated on asm.js),

Re: WebAssembly: Mozilla Won

#73
post #67

Earlier quoted context omitted.

A lot. There's a talk by Alex Danilo from Google IO 17 explaining it in detail. Here, I'll link you directly to the part where he starts explaining the differences on a technical level: https://www.youtube.com/watch?v=6v4E6oksar0&t=11m24s Another part is that I suspect it makes maintaining a good JS compiler easier, because all of that asm.js code can be removed. I'm sure the browser vendors are happy about that.

I don't mean the technical differences. I mean the benefit. What will be the gain for the user of a web app?

Compressed download size is indeed only slightly smaller (mostly around 10%), but the parsing is much faster, even noticeable for fairly small demos.

(edit: replied to the wrong comment, apologies)

Re: WebAssembly: Mozilla Won

#74

It seems there is this effort to get C/C++ code performing fast inside of a browser... then at the same time there seems to be an effort to get people to stop coding in C/C++ altogether and switch to something more memory safe. Go or Rust for example. Also, I watched a talk from DConf and saw that D is adding memory safety as well. You need to mark any part of code doing pointer arithmetic as "system code" or somethi…

Rust and many other languages have WebAssembly targets in the pipeline already. Rust has had a target to play with since last year.

Re: WebAssembly: Mozilla Won

#75

It seems there is this effort to get C/C++ code performing fast inside of a browser... then at the same time there seems to be an effort to get people to stop coding in C/C++ altogether and switch to something more memory safe. Go or Rust for example. Also, I watched a talk from DConf and saw that D is adding memory safety as well. You need to mark any part of code doing pointer arithmetic as "system code" or somethi…

It is not about running C/C++, it is about running native code (or something approximating it). With the right backend, most languages should be able to target WebAssembly. The other complication with supporting Go or Rust is that, even if the language is memory safe, the code still needs to be sandboxed.

Re: WebAssembly: Mozilla Won

#76
One of the best things about Flash was that you could pack up all your bytecode and bitmaps and vectors and sounds and fonts into a single compressed SWF file that contained your entire application/game/demo. That made it really easy to do stuff like double-click-able client demos and deliverables for websites. Ditto for Java and JAR files.

Looks like the "compressed bytecode that runs really fast" part is now a reality. I'm hoping they'll work on making deliverable packages that are convenient for programmers and users.

Anyone know if there is there anything like this in the works?

Re: WebAssembly: Mozilla Won

#77
post #68

Earlier quoted context omitted.

Yes, faster load times. Also, a more sensible target language.

How much faster? I would think gzip should even out most of the difference between a text based and a byte based code.

> I would think gzip should even out most of the difference between a text based and a byte based code.

You would be wrong then. Quoting Unity https://blogs.unity3d.com/2015/06/18/webgl-webassembly-and-f...

"Experimenting with a prototype WebAssembly format on a build of our AngryBots demo, we saw the size of the generated JavaScript code go from 19.0 MB of asm.js code (gzip-compressed to 4.1 MB) down to 6.3 MB of WebAssembly code (gzip-compressed to 3.0 MB). This means that the amount of data the browser needs to process gets reduced by 3.0x, and the compressed download size gets reduced by 1.4x."

So WebAssembly is 1.4x smaller, after gzip.

Re: WebAssembly: Mozilla Won

#78

It's worth pointing out that Mozilla can only continue to put pressure on Google and fight for the open web if people continue to use Firefox and support them. Consider switching to Firefox even if you prefer Chrome. Report websites that don't support FF. We are all better off for the existence of Mozilla, and strong viable competition to Chrome and IE.

Even if thousands of developers from HN switch, that would hardly move the needle. Ordinary users just won't care about any of this.

Servo, which I think is the most important software project in the world, is where it will start to change. That's when those of us who may not be directly contributing code into Servo need to come out and do our thing. I still fondly remember the NYT ad and the crop circle. We should do it all over again.

Re: WebAssembly: Mozilla Won

#79

It's worth pointing out that Mozilla can only continue to put pressure on Google and fight for the open web if people continue to use Firefox and support them. Consider switching to Firefox even if you prefer Chrome. Report websites that don't support FF. We are all better off for the existence of Mozilla, and strong viable competition to Chrome and IE.

You make it sound like Mozilla is somehow fighting against Google for the open web. But virtually all browser vendors are aligned on this issue, and have been working towards improving the web through standardization, improved performance, and functionality for years now.

Re: WebAssembly: Mozilla Won

#80
post #3

I think this is a good thing. It probably prevented a new DirectX style dark age of the web. Probably! I don't pretend to be able predict what path companies would have went in the next few years. It's really good to see that there is a will to agree and that there is more than one player. Could always be more, also for keeping standards sane. (WebSQL officially failed because there isn't more variety)

>It probably prevented a new DirectX style dark age of the web. DirectX was hardly a dark age, DX8 and onwards was a step ahead of GL.

But tied only to one OS. I believe this is what the OP meant and something I agree with.
Post reply on HN