3 ms·
> Do the rust developers not want to emulate what ipsc and cuda do? Of course, which is why the language already allows you to do that if you want to, and it o
by fluffything 7y ago
> Do the rust developers not want to emulate what ipsc and cuda do?
Of course, which is why the language already allows you to do that if you want to, and it often performs better than ISPC, while being memory and thread safe.
However, because Rust is a low-level language, it also allows you to write low-level code that uses assembly-like intrinsics for specific instructions manually, which is what this blog post shows.
I personally think that if your goal is to teach a new programming paradigm, like data-parallel programing (SIMD/SIMT/..), using assembly is a pretty inefficient way to do that. If you already know a data-parallel programming language like ISPC, then there is a lot of value on learning to which assembly instructions your code should lower to on each hardware and getting an intuition for that.
- BubRoss 7y agoPerforming better than ISPC is a pretty bold claim, you are definitely going to need to provide a source for that. Rust developers have had people telling them about ISPC for years and have waived off any need to look at it and understand why it works so well.
- fluffything 7y agoSee https://github.com/rust-lang-nursery/packed_simd#performance https://github.com/rust-lang-nursery/packed_simd#performance Apparently the results have a spread, depending on the CPU used to perform the benchmark - they appear to be testing from haswell to skylake so that covers a wide range of x86 hardware. Matching ISPC perf in the low end, and being ~1.5x faster on the high end, while being able to target all hardware that Rust can target (arm, wasm, ppc, riscv...) sound better than ISPC to me, which works for x86 very well, but not so good for ARM, and not really at all for anything else.