1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-23 18:18:00 +02:00

Faster AddRange(Span<T>)

This commit is contained in:
Brian Fiete 2023-01-26 10:55:45 -05:00
parent b18ec8ccd3
commit 998cdfae4c

View file

@ -385,8 +385,8 @@ namespace System.Collections
Free(oldPtr);
return;
}
for (var val in ref addSpan)
mItems[mSize++] = val;
Internal.MemCpy(mItems + mSize, addSpan.Ptr, addSpan.Length * alignof(T), alignof(T));
mSize += (.)addSpan.Length;
#if VERSION_LIST
mVersion++;
#endif