Live data from Hacker News

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

usenix.org

1–10 of 212 posts

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

#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?

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

#3
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/kernel. Finally, my dream of BSD on risc-v is achieved! ....or more likely, just running linux on arm.

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

#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?

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

#6

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…

I hate to break it to you, but I Java didn’t do this for you I don’t think WebAssembly is going to either. :-/

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

#7

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…

You don't mind drivers being half as performant as they were before, with the only benefit being they're easier to distribute? Why? How is that beneficial to anyone except the person packaging the driver?

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

#8
> an offline compiler like Clang can spend considerably more time to generate better code, whereas WebAssembly compilers must be fast enough to run online

> [security] checks are necessary for WebAssembly’s safety

> current JavaScript implementations reserve a few registers for their own use, which increases register pressure on WebAssembly

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

#9

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…

Yeah, I'd say that it's actually pretty good result. Too bad that the benchmark doesn't include any non-browser WASM runtimes, like Wasmtime or Wasmer.

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

#10

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…

You don't mind drivers being half as performant as they were before, with the only benefit being they're easier to distribute? Why? How is that beneficial to anyone except the person packaging the driver?

The browser is a really good sandbox. The security of browsers is also what makes web apps easy to distribute.

That said I don't see the point of writing drivers in webassembly. If you want better security for drivers, there are better endeavors like microkernel architectures which Linux still isn't using.

Post reply on HN