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

Is there any performance improvement than the original js version? #1

Open
rubick24 opened this issue Sep 21, 2018 · 3 comments
Open

Comments

@rubick24
Copy link

I noticed the splashy example is just calling js WebGL APIs, is there a way to render with OpenGL APIs and apply the rendered framebuffer data to canvas? I think that would have better performance.

@thomas-hoer
Copy link

I wrote a plain js port of the bouncy example.
For 1000 dots, no lines, no dashes i got on my Win 10, Intel Atom @1,6 GHz, Chrome 89 a frame rate of ~25 fps compared to ~3,7 fps for the wasm example. Also, I recompiled the go code with the go 16.2 compiler and got a frame rate of ~5 fps on the same machnine. This shows me, that the go team is still working to reduce the overhead.
index.zip

@justinclift
Copy link
Contributor

@thomas-hoer As a data point, when I visit the online wasm demo page for bouncy it tells me I'm getting 60 FPS (probably capped by refresh rate, but that's just a guess).

That's on my OpenSUSE Leap 15.2 laptop, with Firefox v87. The laptop has a Ryzen 2700U cpu, and Radeon RX 560X gpu.

Not sure why your machine is giving such a low frame rate. 😦

@thomas-hoer
Copy link

Intel Atom E3950 is a low budged processor. You can use it to observe bottlenecks. You might wanna enable lines and dashed to stress your system under 60 fps and compare it with the plain js implementation.

Also I recognized that the WebAssembly compiled with Go 1.16 was about 20% faster than your binaries from Go1.13.

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

3 participants