maybe this optimization is generalizable?
maybe this optimization is generalizable?

this, ouchSystem.Numerics.VectorISimdVector comes outtypeof(T) == typeof(double)if (typeof(T) == typeof(double) && Vector256.IsHardwareAccelerated)
{
var _this = Vector256.Create(
Unsafe.As<T, double>(ref Unsafe.AsRef(X)),
Unsafe.As<T, double>(ref Unsafe.AsRef(Y)),
Unsafe.As<T, double>(ref Unsafe.AsRef(Z)),
0);
var _other = Vector256.Create(
Unsafe.As<T, double>(ref Unsafe.AsRef(other.X)),
Unsafe.As<T, double>(ref Unsafe.AsRef(other.Y)),
Unsafe.As<T, double>(ref Unsafe.AsRef(other.Z)),
0);
return _this.Equals(_other);
} if (!RuntimeHelpers.IsReferenceOrContainsReferences<T>())
{
var size = Unsafe.SizeOf<T>();
if (Vector128.IsHardwareAccelerated && (size * Count) < 16)
{
Span<byte> data = stackalloc byte[32];
data.Clear(); // optional?
var copy = this; // make you guys happy
MemoryMarshal.AsBytes(MemoryMarshal.CreateSpan(ref copy, 1)).CopyTo(data);
MemoryMarshal.AsBytes(MemoryMarshal.CreateSpan(ref other, 1)).CopyTo(data[16..]);
MemoryMarshal.Cast<byte, Vector128<>()
}
}