-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
arch-x64arch-x86area-System.Drawingin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedos-linuxLinux OS (any supported distro)Linux OS (any supported distro)os-windowstenet-performancePerformance related issuePerformance related issuetenet-performance-benchmarksIssue from performance benchmarkIssue from performance benchmark
Milestone
Description
Run Information
Architecture | x64 |
---|---|
OS | ubuntu 18.04 |
Baseline | 76a443d3954f072c7e9778844115026e564ce5a1 |
Compare | d32f44679de07a74e894c853076233f12353c754 |
Regressions in System.Drawing.Tests.Perf_Color
Benchmark | Baseline | Test | Test/Base | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL |
---|---|---|---|---|---|---|---|---|
GetHue | 1.14 μs | 1.66 μs | 1.46 | |||||
FromArgb_AlphaColor | 6.00 ns | 7.82 ns | 1.30 |
Historical Data in Reporting System
Repro
git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Drawing.Tests.Perf_Color*'
.
Payloads
Histogram
System.Drawing.Tests.Perf_Color.GetHue
[1023.755 ; 1066.517) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1066.517 ; 1112.914) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1112.914 ; 1158.881) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1158.881 ; 1203.682) | @@@@@@@@@@@
[1203.682 ; 1250.079) |
[1250.079 ; 1296.476) |
[1296.476 ; 1342.873) |
[1342.873 ; 1389.271) |
[1389.271 ; 1435.668) |
[1435.668 ; 1482.065) |
[1482.065 ; 1528.463) |
[1528.463 ; 1580.501) |
[1580.501 ; 1626.898) | @@@@@
[1626.898 ; 1684.673) | @@@@@@@@@@@@@
[1684.673 ; 1736.179) | @@@
System.Drawing.Tests.Perf_Color.FromArgb_AlphaColor
[5.713 ; 5.885) | @@@@@@@@@@@@@@@@@@@
[5.885 ; 6.104) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[6.104 ; 6.251) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[6.251 ; 6.397) |
[6.397 ; 6.616) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[6.616 ; 6.763) |
[6.763 ; 6.910) |
[6.910 ; 7.056) |
[7.056 ; 7.203) |
[7.203 ; 7.363) |
[7.363 ; 7.663) | @@@@@@@@
[7.663 ; 8.078) | @@@@@@@@@@@
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Architecture | x64 |
---|---|
OS | Windows 10.0.18362 |
Baseline | 5432a66018c2499b88a54276f468ea903ed2b8de |
Compare | d32f44679de07a74e894c853076233f12353c754 |
Regressions in System.Drawing.Tests.Perf_Color
Benchmark | Baseline | Test | Test/Base | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL |
---|---|---|---|---|---|---|---|---|
GetHue | 1.49 μs | 2.04 μs | 1.37 | 12302.660678438979 | 13931.932245922208 | 1.1324324558783132 | Trace | Trace |
GetSaturation | 1.18 μs | 1.74 μs | 1.48 | 11209.919839679358 | 12729.864990689013 | 1.1355892970464927 | Trace | Trace |
Related Issue on x64 ubuntu
[Perf -12%] System.Drawing.Tests.Perf_Color.GetSaturation
Related Issue on x64 ubuntu
[Perf 23%] System.Drawing.Tests.Perf_Color.GetBrightness
Historical Data in Reporting System
Repro
git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Drawing.Tests.Perf_Color*'
.
Payloads
Histogram
System.Drawing.Tests.Perf_Color.GetHue
[1334.228 ; 1379.596) | @@@@@@@@@@@@@
[1379.596 ; 1421.865) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1421.865 ; 1471.899) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1471.899 ; 1513.645) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1513.645 ; 1555.980) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1555.980 ; 1595.617) | @@@@@@@@@@@
[1595.617 ; 1638.495) | @
[1638.495 ; 1680.241) |
[1680.241 ; 1721.987) |
[1721.987 ; 1763.733) |
[1763.733 ; 1805.479) |
[1805.479 ; 1856.384) |
[1856.384 ; 1898.130) | @@@@@
[1898.130 ; 1959.558) | @
[1959.558 ; 2001.304) | @@@@@@
[2001.304 ; 2110.175) | @@@@@@
Baseline Jit Disasm
; System.Drawing.Tests.Perf_Color.GetHue()
push rdi
push rsi
push rbx
sub rsp,30
vzeroupper
vmovaps [rsp+20],xmm6
vxorps xmm6,xmm6,xmm6
mov rcx,24048077D88
mov rsi,[rcx]
xor edi,edi
mov ebx,[rsi+8]
test ebx,ebx
jle short M00_L01
M00_L00:
movsxd rcx,edi
lea rcx,[rcx+rcx*2]
lea rcx,[rsi+rcx*8+10]
call System.Drawing.Color.GetHue()
vaddss xmm6,xmm0,xmm6
inc edi
cmp ebx,edi
jg short M00_L00
M00_L01:
vmovaps xmm0,xmm6
vmovaps xmm6,[rsp+20]
add rsp,30
pop rbx
pop rsi
pop rdi
ret
; Total bytes of code 87
; System.Drawing.Color.GetHue()
sub rsp,28
vzeroupper
call System.Drawing.Color.get_Value()
mov edx,eax
and edx,0FF0000
sar edx,10
mov ecx,eax
and ecx,0FF00
sar ecx,8
and eax,0FF
cmp edx,ecx
jne short M01_L00
cmp ecx,eax
jne short M01_L00
vxorps xmm0,xmm0,xmm0
add rsp,28
ret
M01_L00:
mov r8d,edx
mov r9d,ecx
cmp r8d,r9d
jle short M01_L01
mov r8d,ecx
jmp short M01_L02
M01_L01:
mov r8d,edx
M01_L02:
mov r9d,eax
cmp r8d,r9d
jle short M01_L03
mov r9d,eax
jmp short M01_L04
M01_L03:
mov r9d,r8d
M01_L04:
mov r8d,edx
mov r10d,ecx
cmp r8d,r10d
jge short M01_L05
mov r8d,ecx
jmp short M01_L06
M01_L05:
mov r8d,edx
M01_L06:
mov r10d,eax
cmp r8d,r10d
jge short M01_L07
mov r10d,eax
jmp short M01_L08
M01_L07:
mov r10d,r8d
M01_L08:
mov r8d,r10d
sub r8d,r9d
vxorps xmm0,xmm0,xmm0
vcvtsi2ss xmm0,xmm0,r8d
cmp edx,r10d
jne short M01_L09
sub ecx,eax
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,ecx
vdivss xmm0,xmm1,xmm0
jmp short M01_L11
M01_L09:
cmp ecx,r10d
jne short M01_L10
sub eax,edx
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,eax
vdivss xmm0,xmm1,xmm0
vaddss xmm0,xmm0,dword ptr [7FF8AAB6B618]
jmp short M01_L11
M01_L10:
sub edx,ecx
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,edx
vdivss xmm0,xmm1,xmm0
vaddss xmm0,xmm0,dword ptr [7FF8AAB6B61C]
M01_L11:
vmulss xmm0,xmm0,dword ptr [7FF8AAB6B620]
vxorps xmm1,xmm1,xmm1
vucomiss xmm1,xmm0
jbe short M01_L12
vaddss xmm0,xmm0,dword ptr [7FF8AAB6B624]
M01_L12:
add rsp,28
ret
; Total bytes of code 244
Compare Jit Disasm
; System.Drawing.Tests.Perf_Color.GetHue()
push rdi
push rsi
push rbx
sub rsp,30
vzeroupper
vmovaps [rsp+20],xmm6
vxorps xmm6,xmm6,xmm6
mov rcx,2392EFC7D88
mov rsi,[rcx]
xor edi,edi
mov ebx,[rsi+8]
test ebx,ebx
jle short M00_L01
M00_L00:
movsxd rcx,edi
lea rcx,[rcx+rcx*2]
lea rcx,[rsi+rcx*8+10]
call System.Drawing.Color.GetHue()
vaddss xmm6,xmm0,xmm6
inc edi
cmp ebx,edi
jg short M00_L00
M00_L01:
vmovaps xmm0,xmm6
vmovaps xmm6,[rsp+20]
add rsp,30
pop rbx
pop rsi
pop rdi
ret
; Total bytes of code 87
; System.Drawing.Color.GetHue()
sub rsp,28
vzeroupper
call System.Drawing.Color.get_Value()
mov edx,eax
and edx,0FF0000
sar edx,10
mov ecx,eax
and ecx,0FF00
sar ecx,8
and eax,0FF
cmp edx,ecx
jne short M01_L00
cmp ecx,eax
jne short M01_L00
vxorps xmm0,xmm0,xmm0
add rsp,28
ret
M01_L00:
mov r8d,edx
mov r9d,ecx
cmp r8d,r9d
jle short M01_L01
mov r8d,ecx
jmp short M01_L02
M01_L01:
mov r8d,edx
M01_L02:
mov r9d,eax
cmp r8d,r9d
jle short M01_L03
mov r9d,eax
jmp short M01_L04
M01_L03:
mov r9d,r8d
M01_L04:
mov r8d,edx
mov r10d,ecx
cmp r8d,r10d
jge short M01_L05
mov r8d,ecx
jmp short M01_L06
M01_L05:
mov r8d,edx
M01_L06:
mov r10d,eax
cmp r8d,r10d
jge short M01_L07
mov r10d,eax
jmp short M01_L08
M01_L07:
mov r10d,r8d
M01_L08:
mov r8d,r10d
sub r8d,r9d
vxorps xmm0,xmm0,xmm0
vcvtsi2ss xmm0,xmm0,r8d
cmp edx,r10d
jne short M01_L09
sub ecx,eax
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,ecx
vdivss xmm0,xmm1,xmm0
jmp short M01_L11
M01_L09:
cmp ecx,r10d
jne short M01_L10
sub eax,edx
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,eax
vdivss xmm0,xmm1,xmm0
vaddss xmm0,xmm0,dword ptr [7FFE7D25A888]
jmp short M01_L11
M01_L10:
sub edx,ecx
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,edx
vdivss xmm0,xmm1,xmm0
vaddss xmm0,xmm0,dword ptr [7FFE7D25A88C]
M01_L11:
vmulss xmm0,xmm0,dword ptr [7FFE7D25A890]
vxorps xmm1,xmm1,xmm1
vucomiss xmm1,xmm0
jbe short M01_L12
vaddss xmm0,xmm0,dword ptr [7FFE7D25A894]
M01_L12:
add rsp,28
ret
; Total bytes of code 244
System.Drawing.Tests.Perf_Color.GetSaturation
[1121.278 ; 1162.971) | @@@@@@@@@@@@@@@@@@
[1162.971 ; 1206.044) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1206.044 ; 1261.885) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1261.885 ; 1324.532) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1324.532 ; 1370.662) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1370.662 ; 1412.005) | @@@@@@@@@@@@@@@@@@@@@@
[1412.005 ; 1449.675) | @@
[1449.675 ; 1492.748) |
[1492.748 ; 1535.821) |
[1535.821 ; 1582.045) |
[1582.045 ; 1625.119) | @@@
[1625.119 ; 1667.614) |
[1667.614 ; 1710.688) | @@@@
[1710.688 ; 1780.397) | @@@@@
[1780.397 ; 1834.947) | @@@
[1834.947 ; 1888.260) | @@@
Baseline Jit Disasm
; System.Drawing.Tests.Perf_Color.GetSaturation()
push rdi
push rsi
push rbx
sub rsp,30
vzeroupper
vmovaps [rsp+20],xmm6
vxorps xmm6,xmm6,xmm6
mov rcx,11AD6217D88
mov rsi,[rcx]
xor edi,edi
mov ebx,[rsi+8]
test ebx,ebx
jle short M00_L01
M00_L00:
movsxd rcx,edi
lea rcx,[rcx+rcx*2]
lea rcx,[rsi+rcx*8+10]
call System.Drawing.Color.GetSaturation()
vaddss xmm6,xmm0,xmm6
inc edi
cmp ebx,edi
jg short M00_L00
M00_L01:
vmovaps xmm0,xmm6
vmovaps xmm6,[rsp+20]
add rsp,30
pop rbx
pop rsi
pop rdi
ret
; Total bytes of code 87
; System.Drawing.Color.GetSaturation()
sub rsp,28
vzeroupper
call System.Drawing.Color.get_Value()
mov edx,eax
and edx,0FF0000
sar edx,10
mov ecx,eax
and ecx,0FF00
sar ecx,8
and eax,0FF
cmp edx,ecx
jne short M01_L00
cmp ecx,eax
jne short M01_L00
vxorps xmm0,xmm0,xmm0
add rsp,28
ret
M01_L00:
mov r8d,edx
mov r9d,ecx
cmp r8d,r9d
jle short M01_L01
mov r8d,ecx
jmp short M01_L02
M01_L01:
mov r8d,edx
M01_L02:
mov r9d,eax
cmp r8d,r9d
jle short M01_L03
mov r9d,eax
jmp short M01_L04
M01_L03:
mov r9d,r8d
M01_L04:
cmp edx,ecx
jge short M01_L05
jmp short M01_L06
M01_L05:
mov ecx,edx
M01_L06:
cmp ecx,eax
jge short M01_L07
jmp short M01_L08
M01_L07:
mov eax,ecx
M01_L08:
lea edx,[rax+r9]
cmp edx,0FF
jle short M01_L09
mov edx,eax
neg edx
add edx,1FE
sub edx,r9d
M01_L09:
sub eax,r9d
vxorps xmm0,xmm0,xmm0
vcvtsi2ss xmm0,xmm0,eax
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,edx
vdivss xmm0,xmm0,xmm1
add rsp,28
ret
; Total bytes of code 160
Compare Jit Disasm
; System.Drawing.Tests.Perf_Color.GetSaturation()
push rdi
push rsi
push rbx
sub rsp,30
vzeroupper
vmovaps [rsp+20],xmm6
vxorps xmm6,xmm6,xmm6
mov rcx,1DCA7567D88
mov rsi,[rcx]
xor edi,edi
mov ebx,[rsi+8]
test ebx,ebx
jle short M00_L01
M00_L00:
movsxd rcx,edi
lea rcx,[rcx+rcx*2]
lea rcx,[rsi+rcx*8+10]
call System.Drawing.Color.GetSaturation()
vaddss xmm6,xmm0,xmm6
inc edi
cmp ebx,edi
jg short M00_L00
M00_L01:
vmovaps xmm0,xmm6
vmovaps xmm6,[rsp+20]
add rsp,30
pop rbx
pop rsi
pop rdi
ret
; Total bytes of code 87
; System.Drawing.Color.GetSaturation()
sub rsp,28
vzeroupper
call System.Drawing.Color.get_Value()
mov edx,eax
and edx,0FF0000
sar edx,10
mov ecx,eax
and ecx,0FF00
sar ecx,8
and eax,0FF
cmp edx,ecx
jne short M01_L00
cmp ecx,eax
jne short M01_L00
vxorps xmm0,xmm0,xmm0
add rsp,28
ret
M01_L00:
mov r8d,edx
mov r9d,ecx
cmp r8d,r9d
jle short M01_L01
mov r8d,ecx
jmp short M01_L02
M01_L01:
mov r8d,edx
M01_L02:
mov r9d,eax
cmp r8d,r9d
jle short M01_L03
mov r9d,eax
jmp short M01_L04
M01_L03:
mov r9d,r8d
M01_L04:
cmp edx,ecx
jge short M01_L05
jmp short M01_L06
M01_L05:
mov ecx,edx
M01_L06:
cmp ecx,eax
jge short M01_L07
jmp short M01_L08
M01_L07:
mov eax,ecx
M01_L08:
lea edx,[rax+r9]
cmp edx,0FF
jle short M01_L09
mov edx,eax
neg edx
add edx,1FE
sub edx,r9d
M01_L09:
sub eax,r9d
vxorps xmm0,xmm0,xmm0
vcvtsi2ss xmm0,xmm0,eax
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,edx
vdivss xmm0,xmm0,xmm1
add rsp,28
ret
; Total bytes of code 160
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Architecture | x86 |
---|---|
OS | Windows 10.0.18362 |
Baseline | 76a443d3954f072c7e9778844115026e564ce5a1 |
Compare | d32f44679de07a74e894c853076233f12353c754 |
Regressions in System.Drawing.Tests.Perf_Color
Benchmark | Baseline | Test | Test/Base | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL |
---|---|---|---|---|---|---|---|---|
GetHue | 1.46 μs | 2.31 μs | 1.58 | 15289.41964586279 | 17210.271453182475 | 1.125632748123272 | Trace | Trace |
FromArgb_AlphaColor | 5.92 ns | 9.07 ns | 1.53 | 70.6162059534932 | 84.24000269813293 | 1.1929273395629914 | Trace | Trace |
Related Issue on x64 ubuntu
[Perf -12%] System.Drawing.Tests.Perf_Color.GetSaturation
Related Issue on x64 ubuntu
[Perf 23%] System.Drawing.Tests.Perf_Color.GetBrightness
Historical Data in Reporting System
Repro
git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Drawing.Tests.Perf_Color*'
.
Payloads
Histogram
System.Drawing.Tests.Perf_Color.GetHue
[1339.378 ; 1387.981) | @@@@@@@@@
[1387.981 ; 1445.272) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1445.272 ; 1518.715) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1518.715 ; 1579.708) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1579.708 ; 1645.655) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1645.655 ; 1701.115) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1701.115 ; 1741.845) | @
[1741.845 ; 1802.838) |
[1802.838 ; 1863.831) |
[1863.831 ; 1924.824) |
[1924.824 ; 1985.817) |
[1985.817 ; 2046.810) |
[2046.810 ; 2113.487) |
[2113.487 ; 2186.065) | @@@
[2186.065 ; 2251.515) | @@
[2251.515 ; 2312.508) | @@@@@@@@
[2312.508 ; 2361.329) | @
[2361.329 ; 2417.350) |
[2417.350 ; 2478.343) | @@@
Baseline Jit Disasm
; System.Drawing.Tests.Perf_Color.GetHue()
push ebp
mov ebp,esp
push edi
push esi
push ebx
sub esp,8
vzeroupper
vxorps xmm0,xmm0,xmm0
vmovss dword ptr [ebp+0FFF0],xmm0
mov esi,ds:[46D4]
xor edi,edi
mov ebx,[esi+4]
test ebx,ebx
jle short M00_L03
M00_L00:
mov ecx,edi
shl ecx,4
lea ecx,[esi+ecx+8]
call System.Drawing.Color.GetHue()
fstp dword ptr [ebp+0FFEC]
vmovss xmm0,dword ptr [ebp+0FFEC]
vaddss xmm0,xmm0,dword ptr [ebp+0FFF0]
inc edi
cmp ebx,edi
jg short M00_L02
M00_L01:
vmovss dword ptr [ebp+0FFF0],xmm0
fld dword ptr [ebp+0FFF0]
lea esp,[ebp+0FFF4]
pop ebx
pop esi
pop edi
pop ebp
ret
M00_L02:
vmovss dword ptr [ebp+0FFF0],xmm0
jmp short M00_L00
M00_L03:
vmovss xmm0,dword ptr [ebp+0FFF0]
jmp short M00_L01
; Total bytes of code 98
; System.Drawing.Color.GetHue()
push ebp
mov ebp,esp
push edi
push esi
push ebx
sub esp,0C
vzeroupper
call System.Drawing.Color.get_Value()
mov [ebp+0FFEC],eax
mov [ebp+0FFF0],edx
mov eax,[ebp+0FFEC]
mov edx,[ebp+0FFF0]
mov edx,eax
and edx,0FF0000
sar edx,10
mov ecx,eax
and ecx,0FF00
sar ecx,8
and eax,0FF
cmp edx,ecx
jne short M01_L00
cmp ecx,eax
jne short M01_L00
vxorps xmm0,xmm0,xmm0
vmovss dword ptr [ebp+0FFE8],xmm0
fld dword ptr [ebp+0FFE8]
lea esp,[ebp+0FFF4]
pop ebx
pop esi
pop edi
pop ebp
ret
M01_L00:
mov esi,edx
mov edi,ecx
cmp esi,edi
jle short M01_L01
mov esi,ecx
jmp short M01_L02
M01_L01:
mov esi,edx
M01_L02:
mov edi,eax
cmp esi,edi
jle short M01_L03
mov edi,eax
jmp short M01_L04
M01_L03:
mov edi,esi
M01_L04:
mov esi,edx
mov ebx,ecx
cmp esi,ebx
jge short M01_L05
mov esi,ecx
jmp short M01_L06
M01_L05:
mov esi,edx
M01_L06:
mov ebx,eax
cmp esi,ebx
jge short M01_L07
mov ebx,eax
jmp short M01_L08
M01_L07:
mov ebx,esi
M01_L08:
mov esi,ebx
sub esi,edi
vxorps xmm0,xmm0,xmm0
vcvtsi2ss xmm0,xmm0,esi
cmp edx,ebx
jne short M01_L09
sub ecx,eax
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,ecx
vdivss xmm1,xmm1,xmm0
jmp short M01_L11
M01_L09:
cmp ecx,ebx
jne short M01_L10
sub eax,edx
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,eax
vdivss xmm0,xmm1,xmm0
vaddss xmm1,xmm0,dword ptr ds:[0AEF8]
jmp short M01_L11
M01_L10:
sub edx,ecx
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,edx
vdivss xmm0,xmm1,xmm0
vaddss xmm1,xmm0,dword ptr ds:[0AEFC]
M01_L11:
vmulss xmm1,xmm1,dword ptr ds:[0AF00]
vxorps xmm0,xmm0,xmm0
vucomiss xmm0,xmm1
jbe short M01_L12
vaddss xmm1,xmm1,dword ptr ds:[0AF04]
M01_L12:
vmovss dword ptr [ebp+0FFE8],xmm1
fld dword ptr [ebp+0FFE8]
lea esp,[ebp+0FFF4]
pop ebx
pop esi
pop edi
pop ebp
ret
; Total bytes of code 260
Compare Jit Disasm
; System.Drawing.Tests.Perf_Color.GetHue()
push ebp
mov ebp,esp
push edi
push esi
push ebx
sub esp,8
vzeroupper
vxorps xmm0,xmm0,xmm0
vmovss dword ptr [ebp+0FFF0],xmm0
mov esi,ds:[46D4]
xor edi,edi
mov ebx,[esi+4]
test ebx,ebx
jle short M00_L03
M00_L00:
mov ecx,edi
shl ecx,4
lea ecx,[esi+ecx+8]
call System.Drawing.Color.GetHue()
fstp dword ptr [ebp+0FFEC]
vmovss xmm0,dword ptr [ebp+0FFEC]
vaddss xmm0,xmm0,dword ptr [ebp+0FFF0]
inc edi
cmp ebx,edi
jg short M00_L02
M00_L01:
vmovss dword ptr [ebp+0FFF0],xmm0
fld dword ptr [ebp+0FFF0]
lea esp,[ebp+0FFF4]
pop ebx
pop esi
pop edi
pop ebp
ret
M00_L02:
vmovss dword ptr [ebp+0FFF0],xmm0
jmp short M00_L00
M00_L03:
vmovss xmm0,dword ptr [ebp+0FFF0]
jmp short M00_L01
; Total bytes of code 98
; System.Drawing.Color.GetHue()
push ebp
mov ebp,esp
push edi
push esi
push ebx
sub esp,0C
vzeroupper
call System.Drawing.Color.get_Value()
mov [ebp+0FFEC],eax
mov [ebp+0FFF0],edx
mov eax,[ebp+0FFEC]
mov edx,[ebp+0FFF0]
mov edx,eax
and edx,0FF0000
sar edx,10
mov ecx,eax
and ecx,0FF00
sar ecx,8
and eax,0FF
cmp edx,ecx
jne short M01_L00
cmp ecx,eax
jne short M01_L00
vxorps xmm0,xmm0,xmm0
vmovss dword ptr [ebp+0FFE8],xmm0
fld dword ptr [ebp+0FFE8]
lea esp,[ebp+0FFF4]
pop ebx
pop esi
pop edi
pop ebp
ret
M01_L00:
mov esi,edx
mov edi,ecx
cmp esi,edi
jle short M01_L01
mov esi,ecx
jmp short M01_L02
M01_L01:
mov esi,edx
M01_L02:
mov edi,eax
cmp esi,edi
jle short M01_L03
mov edi,eax
jmp short M01_L04
M01_L03:
mov edi,esi
M01_L04:
mov esi,edx
mov ebx,ecx
cmp esi,ebx
jge short M01_L05
mov esi,ecx
jmp short M01_L06
M01_L05:
mov esi,edx
M01_L06:
mov ebx,eax
cmp esi,ebx
jge short M01_L07
mov ebx,eax
jmp short M01_L08
M01_L07:
mov ebx,esi
M01_L08:
mov esi,ebx
sub esi,edi
vxorps xmm0,xmm0,xmm0
vcvtsi2ss xmm0,xmm0,esi
cmp edx,ebx
jne short M01_L09
sub ecx,eax
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,ecx
vdivss xmm1,xmm1,xmm0
jmp short M01_L11
M01_L09:
cmp ecx,ebx
jne short M01_L10
sub eax,edx
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,eax
vdivss xmm0,xmm1,xmm0
vaddss xmm1,xmm0,dword ptr ds:[0B458]
jmp short M01_L11
M01_L10:
sub edx,ecx
vxorps xmm1,xmm1,xmm1
vcvtsi2ss xmm1,xmm1,edx
vdivss xmm0,xmm1,xmm0
vaddss xmm1,xmm0,dword ptr ds:[0B45C]
M01_L11:
vmulss xmm1,xmm1,dword ptr ds:[0B460]
vxorps xmm0,xmm0,xmm0
vucomiss xmm0,xmm1
jbe short M01_L12
vaddss xmm1,xmm1,dword ptr ds:[0B464]
M01_L12:
vmovss dword ptr [ebp+0FFE8],xmm1
fld dword ptr [ebp+0FFE8]
lea esp,[ebp+0FFF4]
pop ebx
pop esi
pop edi
pop ebp
ret
; Total bytes of code 260
System.Drawing.Tests.Perf_Color.FromArgb_AlphaColor
[5.754 ; 5.973) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[5.973 ; 6.144) | @@
[6.144 ; 6.363) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[6.363 ; 6.572) | @
[6.572 ; 6.791) | @@@
[6.791 ; 7.010) |
[7.010 ; 7.335) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[7.335 ; 7.604) | @@@@@
[7.604 ; 7.823) |
[7.823 ; 8.097) | @@
[8.097 ; 8.316) |
[8.316 ; 8.582) | @
[8.582 ; 8.866) | @@@@
[8.866 ; 9.085) | @@@@@@@@@@
[9.085 ; 9.295) | @@@@
Baseline Jit Disasm
; System.Drawing.Tests.Perf_Color.FromArgb_AlphaColor()
push ebp
mov ebp,esp
vzeroupper
add ecx,4
push [ecx+0C]
push [ecx+8]
push [ecx+4]
push [ecx]
mov ecx,edx
mov edx,0FF
call System.Drawing.Color.FromArgb(Int32, System.Drawing.Color)
pop ebp
ret
; Total bytes of code 34
; System.Drawing.Color.FromArgb(Int32, System.Drawing.Color)
push ebp
mov ebp,esp
push edi
push esi
push ebx
sub esp,8
mov esi,ecx
mov edi,edx
cmp edi,0FF
ja short M01_L03
test byte ptr [ebp+16],2
je short M01_L00
mov ebx,[ebp+8]
jmp short M01_L02
M01_L00:
test byte ptr [ebp+16],1
je short M01_L01
movsx ecx,word ptr [ebp+14]
call System.Drawing.KnownColorTable.KnownColorToArgb(System.Drawing.KnownColor)
mov ebx,eax
jmp short M01_L02
M01_L01:
xor ebx,ebx
M01_L02:
shl edi,18
and ebx,0FFFFFF
or edi,ebx
xor edx,edx
mov [ebp+0FFEC],edi
mov [ebp+0FFF0],edx
mov edx,2
xor ecx,ecx
mov eax,esi
mov edi,[ebp+0FFEC]
mov [eax],edi
mov edi,[ebp+0FFF0]
mov [eax+4],edi
xor eax,eax
mov [esi+8],eax
mov [esi+0C],cx
mov [esi+0E],dx
lea esp,[ebp+0FFF4]
pop ebx
pop esi
pop edi
pop ebp
ret 10
M01_L03:
mov edx,ds:[5988]
mov ecx,edi
call System.Drawing.Color.<CheckByte>g__ThrowOutOfByteRange|325_0(Int32, System.String)
int 3
; Total bytes of code 129
Compare Jit Disasm
; System.Drawing.Tests.Perf_Color.FromArgb_AlphaColor()
push ebp
mov ebp,esp
vzeroupper
add ecx,4
push [ecx+0C]
push [ecx+8]
push [ecx+4]
push [ecx]
mov ecx,edx
mov edx,0FF
call System.Drawing.Color.FromArgb(Int32, System.Drawing.Color)
pop ebp
ret
; Total bytes of code 34
; System.Drawing.Color.FromArgb(Int32, System.Drawing.Color)
push ebp
mov ebp,esp
push edi
push esi
push ebx
sub esp,8
mov esi,ecx
mov edi,edx
cmp edi,0FF
ja short M01_L03
test byte ptr [ebp+16],2
je short M01_L00
mov ebx,[ebp+8]
jmp short M01_L02
M01_L00:
test byte ptr [ebp+16],1
je short M01_L01
movsx ecx,word ptr [ebp+14]
call System.Drawing.KnownColorTable.KnownColorToArgb(System.Drawing.KnownColor)
mov ebx,eax
jmp short M01_L02
M01_L01:
xor ebx,ebx
M01_L02:
shl edi,18
and ebx,0FFFFFF
or edi,ebx
xor edx,edx
mov [ebp+0FFEC],edi
mov [ebp+0FFF0],edx
mov edx,2
xor ecx,ecx
mov eax,esi
mov edi,[ebp+0FFEC]
mov [eax],edi
mov edi,[ebp+0FFF0]
mov [eax+4],edi
xor eax,eax
mov [esi+8],eax
mov [esi+0C],cx
mov [esi+0E],dx
lea esp,[ebp+0FFF4]
pop ebx
pop esi
pop edi
pop ebp
ret 10
M01_L03:
mov edx,ds:[5988]
mov ecx,edi
call System.Drawing.Color.<CheckByte>g__ThrowOutOfByteRange|327_0(Int32, System.String)
int 3
; Total bytes of code 129
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Metadata
Metadata
Assignees
Labels
arch-x64arch-x86area-System.Drawingin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedos-linuxLinux OS (any supported distro)Linux OS (any supported distro)os-windowstenet-performancePerformance related issuePerformance related issuetenet-performance-benchmarksIssue from performance benchmarkIssue from performance benchmark