Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Three.js performance compared to asm.js/wasm ports. #7347
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!
@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.