Monkey-SIMDMonkey Programming Forums/User Modules/Monkey-SIMD
| Hi monkyes!|
I want to share with you this little module/wrapper I created which exposes SIMD instructions to monkey. It's still work in progress but I was able to implement SSE, NEON and SIMD.js (experimental) instructions,
I've tested NEON on a raspberry pi 2 and it works correctly. I hope I can test it on iOS soon.
I've test compilation with MSVC, MinGW GCC and ARM GCC.
The HTML5 version requires Firefox Nightly Builds but a polyfill can be enabled using
#SIMD_JS_POLYFILL = True
Anyway, here is the repo with the code:
| Cool! Whats SIMD? ;) |
SIMD stands for Single Instruction Multiple Data. It's a way of parallelizing data and making use of cpu vector registers and instructions. In the case of this module we use 128 bit registers. This means, for example, you can do a vector arithmetic operation that is 4 times faster then a scalar one. Kind of like this:
Here I wrote I little blog post about it:
I also recommend watching this GDC talk which is really great because it focuses a lot on the use of simd on videogames.
| Small update.|
I've successfully tested the module on OS X and on iOS 9 (iPhone 5S). Here you can see a small vine showing off the module on PC using SSE, on Browser using SIMD.js and on iPhone using ARM's NEON.
| Thanks for the explanation, sounds really cool! |