Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nietras/fc3dd8b145e0ea1f9ac93b76d67c1d42 to your computer and use it in GitHub Desktop.
Save nietras/fc3dd8b145e0ea1f9ac93b76d67c1d42 to your computer and use it in GitHub Desktop.
Sort Microbenchmark Results IntStruct/IntClass i7-8700

.NET Core ? (CoreCLR 4.6.27803.0, CoreFX 4.700.19.22901), 64bit RyuJIT

; System.Collections.Sort`1[[System.__Canon, System.Private.CoreLib]].Array()
       mov     rcx,qword ptr [rsi+10h]
       mov     edx,dword ptr [rsi+24h]
       lea     eax,[rdx+1]
       mov     dword ptr [rsi+24h],eax
       cmp     edx,dword ptr [rcx+8]
       jae     00007ff8`ef912c7e
       movsxd  rdx,edx
       mov     rdi,qword ptr [rcx+rdx*8+10h]
       mov     ebx,dword ptr [rsi+20h]
       mov     rcx,qword ptr [rsi]
       mov     rdx,qword ptr [rcx+30h]
       mov     rdx,qword ptr [rdx]
       mov     rax,qword ptr [rdx+28h]
       test    rax,rax
       jne     M00_L00
       mov     rdx,7FF8EF9C54A0h
       call    CoreCLR!JIT_GenericHandleClass
M00_L00:
       mov     rcx,rax
       mov     rdx,rdi
       mov     r9d,ebx
       xor     r8d,r8d
       mov     rax,7FF8EF9125E0h
; Total bytes of code 85

No ILOffsetMap found System.Array.Sort(!!0[], Int32, Int32)

.NET Core ? (CoreCLR 4.6.27808.0, CoreFX 4.700.19.22901), 64bit RyuJIT

; System.Collections.Sort`1[[System.__Canon, System.Private.CoreLib]].Array()
       mov     rcx,qword ptr [rsi+10h]
       mov     edx,dword ptr [rsi+24h]
       lea     eax,[rdx+1]
       mov     dword ptr [rsi+24h],eax
       cmp     edx,dword ptr [rcx+8]
       jae     00007ff8`ef8f2c7e
       movsxd  rdx,edx
       mov     rdi,qword ptr [rcx+rdx*8+10h]
       mov     ebx,dword ptr [rsi+20h]
       mov     rcx,qword ptr [rsi]
       mov     rdx,qword ptr [rcx+30h]
       mov     rdx,qword ptr [rdx]
       mov     rax,qword ptr [rdx+28h]
       test    rax,rax
       jne     M00_L00
       mov     rdx,7FF8EF9A54A0h
       call    CoreCLR!JIT_GenericHandleClass
M00_L00:
       mov     rcx,rax
       mov     rdx,rdi
       mov     r9d,ebx
       xor     r8d,r8d
       mov     rax,7FF8EF8F25E0h
; Total bytes of code 85

No ILOffsetMap found System.Array.Sort(!!0[], Int32, Int32)

BenchmarkDotNet=v0.11.3.1003-nightly, OS=Windows 10.0.17763.437 (1809/October2018Update/Redstone5)
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=3.0.100-preview5-011568
  [Host]     : .NET Core 3.0.0-preview5-27626-15 (CoreCLR 4.6.27622.75, CoreFX 4.700.19.22408), 64bit RyuJIT
  Job-LVSNQP : .NET Core ? (CoreCLR 4.6.27803.0, CoreFX 4.700.19.22901), 64bit RyuJIT
  Job-GCZWAB : .NET Core ? (CoreCLR 4.6.27808.0, CoreFX 4.700.19.22901), 64bit RyuJIT

Runtime=Core  InvocationCount=40000  IterationTime=250.0000 ms  
MaxIterationCount=20  MinIterationCount=15  UnrollFactor=1  
WarmupCount=1  
Method Toolchain Size Mean Error StdDev Median Min Max Ratio Gen 0/1k Op Gen 1/1k Op Gen 2/1k Op Allocated Memory/Op
Array \coreclr-base\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\CoreRun.exe 512 33.04 us 0.2024 us 0.1894 us 33.03 us 32.58 us 33.33 us 1.00 - - - -
Array \coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\CoreRun.exe 512 34.89 us 0.0563 us 0.0527 us 34.90 us 34.78 us 34.97 us 1.06 - - - -
BenchmarkDotNet=v0.11.3.1003-nightly, OS=Windows 10.0.17763.437 (1809/October2018Update/Redstone5)
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=3.0.100-preview5-011568
  [Host]     : .NET Core 3.0.0-preview5-27626-15 (CoreCLR 4.6.27622.75, CoreFX 4.700.19.22408), 64bit RyuJIT
  Job-RVHLML : .NET Core ? (CoreCLR 4.6.27803.0, CoreFX 4.700.19.22901), 64bit RyuJIT
  Job-KQAKWF : .NET Core ? (CoreCLR 4.6.27808.0, CoreFX 4.700.19.22901), 64bit RyuJIT

Runtime=Core  InvocationCount=40000  IterationTime=250.0000 ms  
MaxIterationCount=20  MinIterationCount=15  UnrollFactor=1  
WarmupCount=1  
Method Toolchain Size Mean Error StdDev Median Min Max Ratio Gen 0/1k Op Gen 1/1k Op Gen 2/1k Op Allocated Memory/Op
Array \coreclr-base\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\CoreRun.exe 512 33.36 us 0.1262 us 0.1119 us 33.38 us 33.16 us 33.58 us 1.00 - - - -
Array \coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\CoreRun.exe 512 35.26 us 0.4334 us 0.3842 us 35.20 us 34.80 us 35.93 us 1.06 - - - -

.NET Core ? (CoreCLR 4.6.27803.0, CoreFX 4.700.19.22901), 64bit RyuJIT

; System.Collections.Sort`1[[System.Collections.IntStruct, MicroBenchmarks]].Array()
       mov     r8,qword ptr [rcx+10h]
       mov     edx,dword ptr [rcx+24h]
       lea     r9d,[rdx+1]
       mov     dword ptr [rcx+24h],r9d
       cmp     edx,dword ptr [r8+8]
       jae     00007ff8`ef903f11
       movsxd  rdx,edx
       mov     r8,qword ptr [r8+rdx*8+10h]
       mov     edx,dword ptr [rcx+20h]
       mov     rcx,r8
       mov     r8d,edx
       xor     edx,edx
       xor     r9d,r9d
       mov     rax,7FF8EF9036C8h
; Total bytes of code 53

No ILOffsetMap found System.Array.Sort(!!0[], Int32, Int32)

.NET Core ? (CoreCLR 4.6.27808.0, CoreFX 4.700.19.22901), 64bit RyuJIT

; System.Collections.Sort`1[[System.Collections.IntStruct, MicroBenchmarks]].Array()
       mov     r8,qword ptr [rcx+10h]
       mov     edx,dword ptr [rcx+24h]
       lea     r9d,[rdx+1]
       mov     dword ptr [rcx+24h],r9d
       cmp     edx,dword ptr [r8+8]
       jae     00007ff8`ef903f11
       movsxd  rdx,edx
       mov     r8,qword ptr [r8+rdx*8+10h]
       mov     edx,dword ptr [rcx+20h]
       mov     rcx,r8
       mov     r8d,edx
       xor     edx,edx
       xor     r9d,r9d
       mov     rax,7FF8EF9036C8h
; Total bytes of code 53

No ILOffsetMap found System.Array.Sort(!!0[], Int32, Int32)

BenchmarkDotNet=v0.11.3.1003-nightly, OS=Windows 10.0.17763.437 (1809/October2018Update/Redstone5)
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=3.0.100-preview5-011568
  [Host]     : .NET Core 3.0.0-preview5-27626-15 (CoreCLR 4.6.27622.75, CoreFX 4.700.19.22408), 64bit RyuJIT
  Job-LVSNQP : .NET Core ? (CoreCLR 4.6.27803.0, CoreFX 4.700.19.22901), 64bit RyuJIT
  Job-GCZWAB : .NET Core ? (CoreCLR 4.6.27808.0, CoreFX 4.700.19.22901), 64bit RyuJIT

Runtime=Core  InvocationCount=40000  IterationTime=250.0000 ms  
MaxIterationCount=20  MinIterationCount=15  UnrollFactor=1  
WarmupCount=1  
Method Toolchain Size Mean Error StdDev Median Min Max Ratio RatioSD Gen 0/1k Op Gen 1/1k Op Gen 2/1k Op Allocated Memory/Op
Array \coreclr-base\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\CoreRun.exe 512 3.856 us 0.0760 us 0.0844 us 3.849 us 3.733 us 4.021 us 1.00 0.00 - - - -
Array \coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\CoreRun.exe 512 4.834 us 0.0713 us 0.0632 us 4.828 us 4.747 us 4.956 us 1.25 0.04 - - - -
BenchmarkDotNet=v0.11.3.1003-nightly, OS=Windows 10.0.17763.437 (1809/October2018Update/Redstone5)
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=3.0.100-preview5-011568
  [Host]     : .NET Core 3.0.0-preview5-27626-15 (CoreCLR 4.6.27622.75, CoreFX 4.700.19.22408), 64bit RyuJIT
  Job-RVHLML : .NET Core ? (CoreCLR 4.6.27803.0, CoreFX 4.700.19.22901), 64bit RyuJIT
  Job-KQAKWF : .NET Core ? (CoreCLR 4.6.27808.0, CoreFX 4.700.19.22901), 64bit RyuJIT

Runtime=Core  InvocationCount=40000  IterationTime=250.0000 ms  
MaxIterationCount=20  MinIterationCount=15  UnrollFactor=1  
WarmupCount=1  
Method Toolchain Size Mean Error StdDev Median Min Max Ratio RatioSD Gen 0/1k Op Gen 1/1k Op Gen 2/1k Op Allocated Memory/Op
Array \coreclr-base\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\CoreRun.exe 512 3.842 us 0.1008 us 0.0893 us 3.817 us 3.721 us 4.070 us 1.00 0.00 - - - -
Array \coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\CoreRun.exe 512 4.955 us 0.1174 us 0.1352 us 4.939 us 4.774 us 5.234 us 1.29 0.05 - - - -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment