dotnet/runtime

Span<ReferenceType>.CopyTo is 10-20% slower than Array<ReferenceType>.CopyTo

已關閉

#29,093 建立於 2019年3月27日

 (21 則留言) (3 個反應) (0 位負責人)C# (5,445 個分叉)batch import
area-CodeGen-coreclrhelp wantedtenet-performance

倉庫指標

星標
 (17,886 顆星)
PR 合併指標
 (平均合併 12天 11小時) (30 天內合併 661 個 PR)

描述

How to run the benchmarks:

git clone https://github.com/dotnet/performance.git
# if you have .NET Core 3.0 installed
dotnet run -c Release -f netcoreapp3.0 -p .\performance\src\benchmarks\micro\MicroBenchmarks.csproj --filter *CopyTo<String>*.Array *CopyTo<String>.Span --join --affinity 2
# if you don't have .NET Core 3.0 installed
py .\performance\scripts\benchmarks_ci.py -f netcoreapp3.0 --filter *CopyTo<String>*.Array *CopyTo<String>.Span --bdn-arguments="--join true --affinity 2"
Method Size Mean
Array 2048 511.1 ns
Span 2048 609.9 ns

Full docs for the new benchmarking workflow: https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-corefx.md

category:cq theme:optimization skill-level:expert cost:medium

貢獻者指南