News for hackers. Stuff that matters.
Re:Calls between JavaScript and WebAssembly are finally fast by singularity2001 on Monday October 08, 2018 @03:26PM (#18170523)
maybe the most important improvement will be direct memory access to the canvas bitmaps for super fast game rendering.
Re:Calls between JavaScript and WebAssembly are finally fast by bschwindHN on Monday October 08, 2018 @10:37PM (#18172937)
Wouldn't "super fast game rendering" be done by the GPU via WebGL?
Re:Calls between JavaScript and WebAssembly are finally fast by rafaelvasco on Tuesday October 09, 2018 @01:50PM (#18178181)
For 2D games it's much more convenient to pixel push directly than to deal with vertex buffers, index buffers, shaders... Unfortunately graphics cards are not optimized for that scenario.
Re:Calls between JavaScript and WebAssembly are finally fast by bschwindHN on Tuesday October 09, 2018 @09:02PM (#18181129)
Convenient, but "super fast"?

And though it's a matter of opinion, I disagree. The GPU is easier for me to use for things like screen-space shading, alpha blending, sprite transformations and distortions, and it all performs much faster than the equivalent CPU render code.

Re:Calls between JavaScript and WebAssembly are finally fast by ranwired on Tuesday October 09, 2018 @07:19AM (#18174950)
A lot of game logic also runs on the CPU
Re:Calls between JavaScript and WebAssembly are finally fast by TazeTSchnitzel on Tuesday October 09, 2018 @10:15AM (#18176131)
canvas bitmaps are only useful for rendering though.
Re:Calls between JavaScript and WebAssembly are finally fast by vanderZwan on Monday October 08, 2018 @03:50PM (#18170729)
Assuming that also implies access to typed arrays in general, then applications that involve number crunching become a lot more feasible in JS too.
Re:Calls between JavaScript and WebAssembly are finally fast by mrec on Monday October 08, 2018 @07:04PM (#18172084)
Huh? We've had typed arrays in JS for years. I think they originally went in to support WebGL, but you can use them for other stuff too.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Calls between JavaScript and WebAssembly are finally fast by vanderZwan on Monday October 08, 2018 @09:44PM (#18172750)
Direct access to typed arrays from WASM without having to copy them over whole first, or use the memory buffer of the WASM module. You can't really write a "true" generic in-place sort in WASM right now, so to speak, because there is always a copying back and forth step.