3 ms·
Knowing little about zig, std.mem.eql very likely already uses SIMD. This is about using SIMD to avoid even calling std.mem.eql for 99% of the possible attempt
by ncruces 1y ago
Knowing little about zig, std.mem.eql very likely already uses SIMD.
This is about using SIMD to avoid even calling std.mem.eql for 99% of the possible attempts.
- llimllib 1y agostd.mem.eql is here, super easy to read: https://github.com/ziglang/zig/blob/master/lib/std/mem.zig#L702-L704 https://github.com/ziglang/zig/blob/master/lib/std/mem.zig#L... My read is it would use SIMD if T is @Vector, and not otherwise? But I'm neither a zig nor SIMD expert
- ozgrakkurt 1y agoPretty sure that compiles into assembly for any primitive type like integers, floats etc.
- IshKebab 1y agoWhat do you mean it "compiles into assembly"?
- ozgrakkurt 1y agoI meant to write SIMD