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

Three.js performance compared to asm.js/wasm ports. #7347

josephrocca opened this Issue Oct 14, 2015 · 3 comments


None yet
4 participants

josephrocca commented Oct 14, 2015

After watching this video (a demonstration of Unreal engine ported to HTML5), it's got me thinking about the browser's fundamental limits at this point in its development.

I'm wondering whether that Unreal demo can be achieved with a library like Three.js, or whether the Unreal demo will just inherently perform better because it's all in asm.js.

And to generalise that question, how far are we away from the time when we'll see the browser being able to compete with native performance (like attaining 90% speed of native, say)? Will WebGL2 have something to do with this? Thanks!

@mrdoob mrdoob added the Question label Oct 14, 2015


This comment has been minimized.


mrdoob commented Oct 14, 2015

I don't see anything in that video that can't be achieved in three.js at 60fps.


This comment has been minimized.


GGAlanSmithee commented Oct 14, 2015

Also, WebAssembly will allow js libs (three.js) to take advantage of asm like (prob better since it will be integrated in the engines) performance boosts for critical functionality.

@mrdoob mrdoob closed this Oct 14, 2015


This comment has been minimized.


trusktr commented Apr 6, 2017

@josephrocca To get the best idea of the differences, you'd have to write a small demo in C and compile it to ASM.js, then write the same exact demo using in JS using Three.js. Then run both demos to compare them. Compare developer experience as well as performance.

There's a lot to consider. One big thing is developer skill because I've seen ASM.js ports that perform at 30fps when I've also seen comparable scenes written in Three.js that perform at 60fps.

If you write a small demo in each method, so that developer efficiency is a limited factor, that will be the best way to compare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment