Live data from Hacker News

Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

usenix.org

11–20 of 212 posts

Re: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

#11
post #5
post #2

So... don't completely discard native desktop apps just yet? That said, I suspect we'll soon see something akin to Eelctron for WebAssembly: a toolkit for making UIs that acts as a permissions context/bridge to making calls into the host operating system's API. Or maybe WebAssembly won't be the revolutionary tidal wave of change that many of its proponents hope it will be?

Won’t that be a security nightmare?

Electron apps can already access the host OS, spawn child processes:

https://github.com/martinjackson/electron-run-shell-example

Re: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

#12
post #5
post #2

So... don't completely discard native desktop apps just yet? That said, I suspect we'll soon see something akin to Eelctron for WebAssembly: a toolkit for making UIs that acts as a permissions context/bridge to making calls into the host operating system's API. Or maybe WebAssembly won't be the revolutionary tidal wave of change that many of its proponents hope it will be?

Won’t that be a security nightmare?

Depends on how well the sandboxing it set up, I suppose.

Re: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

#13

Tl;dr: 2x slower in FF, 2.5x slower in chrome. Depending on the application, that doesn't seem to be a huge tradeoff. Certainly many developers are comfortable writing things in python, which is likely hundreds of times slower than C++ in many problem spaces. TBH though my big hope for web assembly has nothing to do with the web at all, but as a distribution format for drivers that can be installed on any cpu arch/ke…

"Certainly many developers are comfortable writing things in python,"

But python is a high level script language with gc. WebAssembly is very lowlevel, so the people who could and would write in python will not write in wasm and also not in C.

Wasm is still awesome, it is just not, what many hope it will be. And a distribution format for drivers? Well, I am not a low level expert, but that seems very unlikely to work out, from what I understand.

Re: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

#14
post #2

So... don't completely discard native desktop apps just yet? That said, I suspect we'll soon see something akin to Eelctron for WebAssembly: a toolkit for making UIs that acts as a permissions context/bridge to making calls into the host operating system's API. Or maybe WebAssembly won't be the revolutionary tidal wave of change that many of its proponents hope it will be?

It can already make use of WebAssembly:

https://github.com/anderejd/electron-wasm-rust-example

Re: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

#15

Tl;dr: 2x slower in FF, 2.5x slower in chrome. Depending on the application, that doesn't seem to be a huge tradeoff. Certainly many developers are comfortable writing things in python, which is likely hundreds of times slower than C++ in many problem spaces. TBH though my big hope for web assembly has nothing to do with the web at all, but as a distribution format for drivers that can be installed on any cpu arch/ke…

Globally compatible drivers is a pipedream, because the problem is not that the machine architecture is different but that the API they interact with is fundamentally different. Unless everyone agrees on some sort of standard like NDIS, but Linux has more or less promised never to have a stable API.

Re: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

#16
Ok. At some point in the future the browser/wasm will have won. So instead of Linux/Windows/OSX we will have Firefox/Safari/Chrome/Whatever all with their own implementation gotchas, missing features and performance loss. All for the sake of browser vendors trying to displace the existing native deployment platforms. They sure have nice financial incentive. Why do we - developers fall into this trap? We've been there quite a few times already, with cross platform standards. No matter what vendors will fsck'em up with proprietary things.

Re: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

#17

Tl;dr: 2x slower in FF, 2.5x slower in chrome. Depending on the application, that doesn't seem to be a huge tradeoff. Certainly many developers are comfortable writing things in python, which is likely hundreds of times slower than C++ in many problem spaces. TBH though my big hope for web assembly has nothing to do with the web at all, but as a distribution format for drivers that can be installed on any cpu arch/ke…

[deleted]

Re: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code

#20
post #16

Ok. At some point in the future the browser/wasm will have won. So instead of Linux/Windows/OSX we will have Firefox/Safari/Chrome/Whatever all with their own implementation gotchas, missing features and performance loss. All for the sake of browser vendors trying to displace the existing native deployment platforms. They sure have nice financial incentive. Why do we - developers fall into this trap? We've been there…

> Why do we - developers fall into this trap?

Regardless of is this a trap or not, it's obvious to me that developers want simplicity and consistency. WA provides both so don't wonder why it's taking off.

> So instead of Linux/Windows/OSX we will have Firefox/Safari/Chrome/Whatever all with their own implementation gotchas

I let the compilers worry about this :)

Post reply on HN