Live data from Hacker News

WebAssembly support now shipping in all major browsers

blog.mozilla.org

151–160 of 346 posts

Re: WebAssembly support now shipping in all major browsers

#151
post #86

Earlier quoted context omitted.

Running anything with the GPU introduces a huge amount of latency, it only makes sense when you need high throughput and have large enough workloads to justify the latency. SIMD code can be interleaved with normal native code with zero latency. And then there's the fact that WebGL is so much behind the state of the art that it's not even funny. Sticking to an old version of GL/GLSL severely limits what you can do wit…

>have large enough workloads to justify the latency Hashsum bruteforcing? It already appears to be picking up, I'm having quite frequent browser crashes these days because of shoddily written JS miners trying to do stuff on GPU

> shoddily written JS

Blame the OS, graphics card drivers, or the browser, but not JS!

Re: WebAssembly support now shipping in all major browsers

#152

For those in the know, what doors is web assembly expected to open? Better cross platform platforms via a browser wrap? Will new types of browser applications be possible that aren't now in JS only world? What are they?

I'm excited for all of the ports of C++ projects the web will get. For example imagine being able to run a full self hosted C++ compiler itself from a browser on any device with a browser.

I don't really understand this. Is a compiler in the browser all that different to a compiler on a server?

Re: WebAssembly support now shipping in all major browsers

#153

Earlier quoted context omitted.

IE is not a major browser anymore http://gs.statcounter.com/ Look at your Google Analytics, it's really not that important anymore.

In corporate env it is.

Either the computers in these mysterious corporate environments are exposed to the internet, in which case they'd be reflected in these public stats collected by them visiting public websites from IE, or they aren't, in which case they don't matter in the slightest because they're not going to visit webpages using WebAssembly.

Re: WebAssembly support now shipping in all major browsers

#154

Earlier quoted context omitted.

IE is not a major browser anymore http://gs.statcounter.com/ Look at your Google Analytics, it's really not that important anymore.

In corporate env it is.

It's important because of internal websites stuck in the past. I doubt you'll ever need web assembly support for those.

Re: WebAssembly support now shipping in all major browsers

#155
post #136
post #125

Earlier quoted context omitted.

Both can be be used to accelerate the image processing application in question. GLSL is compiled on the fly to GPU instructions that exploit parallelism opportunities, but more so than SIMD because GPUs have greater internal paralllelism.

Yes, they share "parallelism" in the most abstract sense, but beyond that, they are completely different approaches in almost every other way. You might try to use them to accelerate the same specific task but they have very different capabilities and performance limitations/advantages. Also one is fairly generalised and one is intended to be very domain specific, so don't share all the same types of potential applic…

I'm still not sure why you insist they are not comparable. GPU compute vs CPU SIMD is a very standard comparison and image recognition applications, like the one discussed, frequently support both.

Re: WebAssembly support now shipping in all major browsers

#156
post #135
post #34

A good occasion to watch Gary Bernhardt's talk "The Birth & Death of JavaScript" [0] again, where he talks about the precursor of WebAssembly: asm.js and the future implication it "could" have in the future in a really humorous way. A few years old but still relevant. You want Gimp for Windows running in Firefox for Linux running in Chrome for Mac? Yeah sure. [0] https://www.destroyallsoftware.com/talks/the-birth-and…

And for a somewhat more practical but at the same time more exotic example, the Internet Archive has a ton of old minicomputers and arcade games running in MESS/MAME, each compiled to webasm. One click and you can boot anything and play it in your browser. https://archive.org/details/softwarelibrary https://archive.org/donate/

This is amazing. If only it would also work in my phone. Probably for the best to stop me “wasting” time ;).

Re: WebAssembly support now shipping in all major browsers

#157

Earlier quoted context omitted.

Have you tested performance on older and lower spec devices? Does it still hold up?

On older mobile devices it can decrease significantly, but it's still much better then any known Javascript alternatives (e.g. quaggaJS) and works reasonably well even when only passing on a handful of frames/sec to the scanner library. (which happens on slower devices) OTOH having SIMD would speed it up significantly and probably get them all up to speed.

That's interesting. We actually use quaggaJS quite heavily, and haven't found any large performance issues even on lower spec devices.

That being said it did take quite a lot of time to get to that point (tuning scan frequency, resolution, and a bunch of other things), and we looked into scandit recently (our company does use scandit in other products) and even though your library can detect and scan barcodes in worse conditions, it didn't really improve scan times or fix our biggest issues on web, which by the looks of it are the same issues you are running into. (iOS 11 being a pain in WebViews and sites added to the homescreen, and lack of the focus management APIs meaning you are at the mercy of the autofocus), plus the requirement for a license check at runtime is shooting our big use case in the foot (some of our users run the webapp offline for days at a time!)

But we have looked into some webassembly for some of this code, and I'm glad to hear it holds up about as well as expected on lower spec devices. I was worried about lower spec devices not being able to handle the larger "binaries" that WASM tends to produce.

And this is really off topic, but I'd love to pick your brain on how you "solved" the constraints issues on some devices with the getUserMedia stuff (flipping the aspect ratio requested, some devices rejecting all constraints except 2 or 3 "blessed" resolutions, problems with orientation affecting the returned resolution regardless of what was asked, etc...). I understand if you can't talk about it due to company secrets, but I figured I'd give it a shot! If you are open to it, my email is on my user page.

Re: WebAssembly support now shipping in all major browsers

#158
If you're looking for an introduction to WebAssembly my "WebAssembly 101: a developer's first steps" post had some success here: https://blog.openbloc.fr/webassembly-first-steps/

HN discussion: https://news.ycombinator.com/item?id=14495893

The awesome-wasm list is also a good start: https://github.com/mbasso/awesome-wasm

Re: WebAssembly support now shipping in all major browsers

#159
post #21

Earlier quoted context omitted.

I think it's darkly humorous that I have to install browser plugins to stop sites from mining monero in my browser. It's like websites are those creepy spider things in the Matrix, except instead of sticking humans in pods to harvest their biochemical energy, they're just running up our home electricity bills by maxing our CPUs.

>maxing our CPUs. And GPU too, I recently saw that I do get frequent crashes on certain pages, it appears that somebody is putting empty ads that do SHAsum in the background with WebGL using vec4 and shaders!

Let's just move all those 80s cyberpunk novels to the nonfiction section and be done with it.

Re: WebAssembly support now shipping in all major browsers

#160

Earlier quoted context omitted.

On older mobile devices it can decrease significantly, but it's still much better then any known Javascript alternatives (e.g. quaggaJS) and works reasonably well even when only passing on a handful of frames/sec to the scanner library. (which happens on slower devices) OTOH having SIMD would speed it up significantly and probably get them all up to speed.

That's interesting. We actually use quaggaJS quite heavily, and haven't found any large performance issues even on lower spec devices. That being said it did take quite a lot of time to get to that point (tuning scan frequency, resolution, and a bunch of other things), and we looked into scandit recently (our company does use scandit in other products) and even though your library can detect and scan barcodes in wors…

Unfortunately I can't get into details regarding the getUserMedia stuff, not only due to trade secrets but also being from the product team and not engineering :)

> plus the requirement for a license check at runtime is shooting our big use case in the foot

That should only be a problem with test licenses, ping us at support@scandit.com and we can help.

Post reply on HN