Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[perf] Major array copying performance difference  #13133

@alexanderkyte

Description

@alexanderkyte

The test System.Tests.Perf_Array.ArrayCopy2D(https://github.com/dotnet/performance/blob/0c626c0de72e9e018bb02d0f92b97117098f1fee/src/benchmarks/micro/corefx/System.Runtime/Perf.Array.cs#L236) shows a big slowdown in our array copy compared to .NET core.

  • This takes 3284214.702 ns on Mono
  • This takes only 342.3348056 ns for .NET core. This is 00.0104% of the time it takes Mono.

A reproduction of this has been made with the executable here: https://gist.github.com/alexanderkyte/3cc2522a0b7391a1326dc65afcd4a3db

When profiled with Instruments, we see a slowdown due to some handle manipulation. It doesn't seem to be falling back to any intrinsic.

array2dslowdown

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions