[Performance] Investigate SIMD Intrinsics
jamescourtney opened this issue · comments
James Courtney commented
.NET Core 3.1 and 5.0 support SIMD intrinsics.
- Are any of these useful to FlatSharp? Some candidates:
- GetMaxSize for tables and vectors.
- VTable equality checks (does
Span.SequenceEqual
already do this internally?)
- If any of them seem useful, can we use them without introducing unsafe code?
James Courtney commented
Span.SequenceEqual does use intrinsics heavily. One optimization we may be able to make is to compare the first int of each vtable before invoking sequence equal. That's allows testing the table length before invoking the "heavy" logic of sequenceequal.