15 ms·
Since you're already using Lua, maybe you'll have an easier time switching to Terra. It supports SIMD, and you only need to deal with embedding LLVM. http://te
by seabee 11y ago
Since you're already using Lua, maybe you'll have an easier time switching to Terra. It supports SIMD, and you only need to deal with embedding LLVM.
http://terralang.org http://terralang.org
- pierrec 11y agoInteresting, 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