Bringing the Power of SIMD.js to gl-matrix

89 views
Skip to first unread message

Evgeny Demidov

unread,
Dec 14, 2015, 2:32:34 AM12/14/15
to webgl-d...@googlegroups.com
to position parts of procedural plants I need matrix library. I'm using
simple Apple's CanvasMatrix now but
https://hacks.mozilla.org/2015/12/bringing-the-power-of-simd-js-to-gl-matrix/
I think it is "a good day to" switch into gl-matrix but

does Canary (Edge) supports SIMD.js? are there any plans?
where can I get SIMD.js based gl-matrix?

Evgeny

Brandon Jones

unread,
Dec 14, 2015, 2:24:22 PM12/14/15
to webgl-d...@googlegroups.com
Thanks for pointing out the article! I hadn't seen that yet.

They mention it in the article, but to use SIMD with glMatrix (for now, anyway) you have to set glMatrix.ENABLE_SIMD = true; (see: https://github.com/toji/gl-matrix/blob/master/dist/gl-matrix.js#L156) Please note that this will effectively force the use of typed arrays for some operations, but if your code uses the <type>.create() and similar methods consistently it shouldn't be a problem.

--Brandon

--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Evgeny Demidov

unread,
Dec 15, 2015, 1:32:39 AM12/15/15
to webgl-d...@googlegroups.com
"Once the flag is toggled, SIMD will be enabled for code that uses asm.js. While the SIMD JavaScript APIs are available and can be used outside of asm.js scenarios, the performance benefits of SIMD currently accrue and are limited to scenarios that use asm.js running on x86 and x64 hardware..." (in Edge)
https://blogs.windows.com/msedgedev/2015/05/21/intel-and-microsoft-partnering-for-an-improved-web-experience/
and Mozilla says that SIMD.js is better in asm.js too

is it possible to make asm.js based gl-matrix library ?

Evgeny

Brandon Jones

unread,
Dec 15, 2015, 12:42:25 PM12/15/15
to webgl-d...@googlegroups.com
It's possible, but I'm not convinced it would yield the performance gains one would think it should. I'd want to do some rigorous benchmarking first.

Reply all
Reply to author
Forward
0 new messages