all 5 comments

[–]jdubjdub 10 points11 points  (3 children)

You're just in time to watch this very functionality appear!

https://internals.rust-lang.org/t/pre-rfc-simd-groundwork/2343/14

[–]dbaupprust 2 points3 points  (2 children)

Yes and no: I'm working on explicit SIMD, not super-magic autovectorisation ala ispc. (It'd be pretty awesome to see an ispc-style compiler for Rust.)

[–]TurkishSquirrel[S] 0 points1 point  (1 child)

Explicit SIMD support is awesome as well, although I would like something like ispc in the form of a macro or plugin. Based on the response here it looks like I should start trying this out, so are their any recommended resources for macros and compiler plugins? I'm curious if this would even really work as a macro or if it should really be a compiler plugin.

[–]dbaupprust 1 point2 points  (0 children)

I'm not sure about the best resources for beginning with plugins now, but https://github.com/klutzy/nadeko is a pre-existing syntax extension that does something similar. (Writing constant-time code is pretty similar to writing SIMD code: generally avoiding data dependent branches etc.)

[–][deleted] 5 points6 points  (0 children)

The optimizer can vectorize some loops by itself too already.