3 ms·
Several comments seem confused about this point: the article is not about manual SIMD, which of course C is perfectly capable of with intrinsics. It's discussin
by mlochbaum 2y ago
Several comments seem confused about this point: the article is not about manual SIMD, which of course C is perfectly capable of with intrinsics. It's discussing problems in compiling architecture-independent code to SIMD instructions, which in practice C compilers very often fail to do (so, exp having scalar hardware support may force other arithmetic not to be vectorized). An alternative mentioned is array programming, where operations are run one at a time on all the data; these languages serve as a proof of concept that useful programs can be run in a way that uses SIMD nearly all the time it's applicable, but at the cost of having to write every intermediate result to memory. So the hope is that "more fluent methods for compilation" can generate SIMD code without losing the advantages of scalar compilation.
As an array implementer I've thought about the issue a lot and have been meaning to write a full page on it. For now I have some comments at https://mlochbaum.github.io/BQN/implementation/versusc.html#fusion-versus-fission https://mlochbaum.github.io/BQN/implementation/versusc.html#... and the last paragraph of https://mlochbaum.github.io/BQN/implementation/compile/intro.html#and-which-is-better https://mlochbaum.github.io/BQN/implementation/compile/intro....
- deleted 2y ago[deleted]
- mlochbaum 2y agoGot the introduction written at https://mlochbaum.github.io/BQN/implementation/compile/fusion.html https://mlochbaum.github.io/BQN/implementation/compile/fusio....
- brundolf 2y agoThank you. The title is confusing
- mlochbaum 2y agoFinding it increasingly funny how many people have come out of the woodworks to "defend" C by offering this or that method of explicit vectorization. What an indictment! C programmers can no longer even conceive of a language that works from a description of what should be done and not which instructions should be used!
- pjmlp 2y agoCompiler specific C is capable of, ISO C has no SIMD support of any form.