logoalt Hacker News

awesantoday at 1:38 PM1 replyview on HN

Zig is adding native vectors including operator support, there are some recent issues/prs about this topic.

The general technique of SoA is pretty useful both in games and other applications, but of course I cannot speak to the specific use-case you are describing.


Replies

nvme0n1p1today at 2:27 PM

Zig vectors force data into SIMD registers even if that would make the code slower. They're a specialty type. You should only reach for vectors if you would have used SIMD intrinsics in C for example.

show 1 reply