mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 23:01:44 +01:00
Perf. optimization
This commit is contained in:
parent
7d4aefe37e
commit
47cb578057
@ -77,10 +77,17 @@ namespace Capnp
|
|||||||
}
|
}
|
||||||
|
|
||||||
Init(items.Count);
|
Init(items.Count);
|
||||||
|
|
||||||
for (int i = 0; i < items.Count; i++)
|
if (items is T[] array)
|
||||||
{
|
{
|
||||||
this[i] = items[i];
|
array.CopyTo(Data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < items.Count; i++)
|
||||||
|
{
|
||||||
|
this[i] = items[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user