Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webassembly is slower than javascript #25

Open
ghost opened this issue Aug 23, 2017 · 8 comments
Open

webassembly is slower than javascript #25

ghost opened this issue Aug 23, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Aug 23, 2017

I have seen a nice video which was talking about performance of web-assembly, but running your example
the javascript is playing with similar speed, but on the graph it has been shown that the wasm is -97% is faster than javascript.

https://youtu.be/6v4E6oksar0?t=1796

my green line is showing 2.3, and my blue line is showing 400-500

@kaminskypavel
Copy link

Same here. Running on chrome (on pixel) , getting a stable -28% webasm vs js.

@chris-morgan
Copy link

My observations of the demo, with 64-bit Firefox Nightly for Windows on a Surface Book (i7-6600U, using integrated graphics):

  • For most of the filters, WebAssembly averages 10–40% slower than JavaScript;
  • For some of the filters, WebAssembly averages −10%–40% faster than JavaScript;
  • For Super Edge, WebAssembly averages 10–20× faster than JavaScript;
  • Beards look even cooler than normal with Super Edge (though I wouldn’t want my beard to look like that in real life).

@6matko
Copy link

6matko commented Oct 17, 2017

Same. On different filters values vary between -77 to -99%.

Chrome Version 61.0.3163.100 (64 bit). Windows 10.

@mariohuizar
Copy link

Same here.
Google Chrome. Version 62.0.3202.75 (64-Bit) Windows 10

@AllNamesRTaken
Copy link

AllNamesRTaken commented Nov 2, 2017

Same here.
Google Chrome. Version 62.0.3202.75 (64-Bit) Windows 8
Generally I cannot find a single benchmark or demo where WebAssembly is faster than JS, though there are rumors and stories.. and this the videio demo.

Edit: Firefox shows similar slowness.

@jlisee
Copy link

jlisee commented Jan 12, 2018

For the simple filters like Grayscale and Invert JS is faster. Once the filters get computation complex, like Gaussian Blur WebAssembly is 50-100% faster. Which matches what you would expect because there is data transfer overhead.

Version 63.0.3239.84 (Official Build) (64-bit)

@MarkusPfundstein
Copy link

Same on firefox, Macbook Air 2014

@ghost
Copy link

ghost commented Feb 26, 2019

I'm getting 40% better FPS on Gaussian Blur with JS, is it possible that Chrome has some optimization and runs the filters on the GPU?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants