3 ms·
Interesting, I looked at Terra before but hadn't noticed the SIMD. The fact that it only supports doubles (instead of float32 which Javascript now supports and
by pierrec 11y ago
Interesting, I looked at Terra before but hadn't noticed the SIMD. The fact that it only supports doubles (instead of float32 which Javascript now supports and vectorizes) makes this a bit less awesome though. SIMD becomes more powerful when you can use smaller data types, which is why JS engines are proud of the float32 + SIMD combination that they now have.
And ideally, you shouldn't need to always specify vector operations, the compiler should optimize your loops (for example) into SIMD instructions. But as far as I know, very few compilers are capable of doing this now. I think some C/C++ and Java compilers are among the only ones, though the example given here suggests that Spidermonkey should also do it to some extent:
https://bugzilla.mozilla.org/show_bug.cgi?id=894105#c2 https://bugzilla.mozilla.org/show_bug.cgi?id=894105#c2