Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Perf] Impact on various benchmarks from not aligning cloned loop #48517

Closed
DrewScoggins opened this issue Feb 19, 2021 · 5 comments
Closed

[Perf] Impact on various benchmarks from not aligning cloned loop #48517

DrewScoggins opened this issue Feb 19, 2021 · 5 comments
Assignees
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Milestone

Comments

@DrewScoggins
Copy link
Member

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in System.Collections.IterateFor<String>

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Span 233.00 ns 199.75 ns 0.86
Array 197.97 ns 117.34 ns 0.59
ReadOnlySpan 229.12 ns 192.81 ns 0.84

graph
graph
graph
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.Collections.IterateFor&lt;String&gt;*'

.

Payloads

Baseline
Compare

Histogram

System.Collections.IterateFor.Span(Size: 512)

[197.686 ; 203.756) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[203.756 ; 209.428) | @
[209.428 ; 215.497) | 
[215.497 ; 221.567) | 
[221.567 ; 227.636) | 
[227.636 ; 236.615) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[236.615 ; 244.410) | @

System.Collections.IterateFor.Array(Size: 512)

[ -8.814 ;   8.814) | @
[  8.814 ;  26.443) | 
[ 26.443 ;  44.072) | 
[ 44.072 ;  61.701) | 
[ 61.701 ;  79.330) | 
[ 79.330 ;  96.958) | 
[ 96.958 ; 110.831) | 
[110.831 ; 128.459) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[128.459 ; 146.588) | @
[146.588 ; 164.217) | 
[164.217 ; 175.219) | 
[175.219 ; 187.858) | @
[187.858 ; 205.487) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[205.487 ; 211.875) | 
[211.875 ; 229.503) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Collections.IterateFor.ReadOnlySpan(Size: 512)

[191.151 ; 197.695) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[197.695 ; 204.239) | 
[204.239 ; 210.784) | 
[210.784 ; 217.328) | 
[217.328 ; 226.437) | 
[226.437 ; 233.945) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

### Run Information
Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in System.Tests.Perf_Int64

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
TryParse 29.92 ns 26.28 ns 0.88
TryParse 29.64 ns 26.23 ns 0.88

graph
graph
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.Tests.Perf_Int64*'

.

Payloads

Baseline
Compare

Histogram

System.Tests.Perf_Int64.TryParse(value: "9223372036854775807")

[22.465 ; 22.935) | @
[22.935 ; 23.716) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[23.716 ; 24.341) | @
[24.341 ; 25.212) | @@@@@
[25.212 ; 25.991) | @@@@@@@@@@@@@@@@@@@@@@
[25.991 ; 26.773) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[26.773 ; 27.358) | @@@@@@@@@@@@@@@@@@@@@@@@
[27.358 ; 28.140) | 
[28.140 ; 29.276) | @@@@@@@@@@@@
[29.276 ; 30.058) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[30.058 ; 31.447) | @@@@@@@@@@@

System.Tests.Perf_Int64.TryParse(value: "-9223372036854775808")

[22.748 ; 23.947) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[23.947 ; 24.759) | @@@
[24.759 ; 25.574) | @@@@@
[25.574 ; 26.338) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[26.338 ; 27.089) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[27.089 ; 27.684) | @@@@@@@@@@@@@@@@
[27.684 ; 28.436) | 
[28.436 ; 29.041) | 
[29.041 ; 29.792) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[29.792 ; 30.573) | @@@@@@@@@@@@@@@@@@@
[30.573 ; 31.628) | @@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in System.Buffers.Text.Tests.Utf8FormatterTests

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
FormatterUInt32 7.36 ns 5.95 ns 0.81
FormatterUInt32 12.09 ns 10.71 ns 0.89
FormatterUInt64 7.70 ns 6.39 ns 0.83

graph
graph
graph
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.Buffers.Text.Tests.Utf8FormatterTests*'

.

Payloads

Baseline
Compare

Histogram

System.Buffers.Text.Tests.Utf8FormatterTests.FormatterUInt32(value: 12345)

[5.701 ; 5.989) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[5.989 ; 6.175) | @
[6.175 ; 6.463) | 
[6.463 ; 6.751) | 
[6.751 ; 7.039) | 
[7.039 ; 7.332) | @@@@
[7.332 ; 7.773) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Buffers.Text.Tests.Utf8FormatterTests.FormatterUInt32(value: 4294967295)

[10.261 ; 10.738) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[10.738 ; 11.200) | @@@@@@@@@@
[11.200 ; 11.480) | 
[11.480 ; 11.759) | 
[11.759 ; 12.027) | @@@
[12.027 ; 12.306) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[12.306 ; 12.598) | @@@@@@

System.Buffers.Text.Tests.Utf8FormatterTests.FormatterUInt64(value: 12345)

[6.346 ; 6.561) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[6.561 ; 6.812) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[6.812 ; 7.027) | @@
[7.027 ; 7.242) | 
[7.242 ; 7.504) | @@@@@@@@@
[7.504 ; 7.860) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in System.IO.Tests.Perf_StreamWriter

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
WriteString 84.19 ms 74.20 ms 0.88

graph
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.IO.Tests.Perf_StreamWriter*'

.

Payloads

Baseline
Compare

Histogram

System.IO.Tests.Perf_StreamWriter.WriteString(writeLength: 2)

[73111321.782 ; 75798270.801) | @@
[75798270.801 ; 78789686.363) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[78789686.363 ; 80750574.591) | @@@
[80750574.591 ; 83516558.227) | @@@@@@@@@
[83516558.227 ; 86655685.349) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[86655685.349 ; 89502509.223) | @@@
[89502509.223 ; 92368907.847) | @

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in System.Perf_Convert

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
FromBase64Chars 97.08 ns 91.04 ns 0.94

graph
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.Perf_Convert*'

.

Payloads

Baseline
Compare

Histogram

System.Perf_Convert.FromBase64Chars

[89.968 ;  91.957) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[91.957 ;  95.153) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[95.153 ;  97.356) | @@@@@@@@@@@@@@@
[97.356 ; 102.456) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in System.Tests.Perf_DateTime

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
ToString 44.89 ns 41.13 ns 0.92

graph
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.Tests.Perf_DateTime*'

.

Payloads

Baseline
Compare

Histogram

System.Tests.Perf_DateTime.ToString(format: "o")

[40.432 ; 41.811) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@
[41.811 ; 43.381) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[43.381 ; 44.496) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[44.496 ; 46.954) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in Microsoft.Extensions.Primitives.StringSegmentBenchmark

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
LastIndexOf 6.01 ns 3.74 ns 0.62

graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'Microsoft.Extensions.Primitives.StringSegmentBenchmark*'

.

Payloads

Baseline
Compare

Histogram

Microsoft.Extensions.Primitives.StringSegmentBenchmark.LastIndexOf

[ 3.670 ;  4.128) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 4.128 ;  4.586) | 
[ 4.586 ;  5.044) | 
[ 5.044 ;  5.439) | 
[ 5.439 ;  5.781) | @@@@@@@@@@@@@@@@@@@@
[ 5.781 ;  6.239) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 6.239 ;  6.469) | @@@@@@@@@@@@@@@@@@@
[ 6.469 ;  6.927) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 6.927 ;  7.363) | @@@@@@@@@@
[ 7.363 ;  7.685) | @@@@@@@
[ 7.685 ;  8.143) | @@@@@@@@@@@@@@@
[ 8.143 ;  8.411) | 
[ 8.411 ;  8.869) | @@@@@@@@@@@@@
[ 8.869 ;  9.327) | 
[ 9.327 ;  9.785) | 
[ 9.785 ; 10.243) | 
[10.243 ; 10.701) | 
[10.701 ; 11.160) | 
[11.160 ; 11.618) | 
[11.618 ; 12.076) | 
[12.076 ; 12.534) | 
[12.534 ; 12.992) | 
[12.992 ; 13.451) | 
[13.451 ; 13.909) | 
[13.909 ; 14.472) | 
[14.472 ; 14.930) | @

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in PerfLabTests.LowLevelPerf

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
GenericClassGenericStaticField 62.17 μs 43.63 μs 0.70

graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'PerfLabTests.LowLevelPerf*'

.

Payloads

Baseline
Compare

Histogram

PerfLabTests.LowLevelPerf.GenericClassGenericStaticField

[42927.928 ; 46135.341) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[46135.341 ; 49342.754) | 
[49342.754 ; 53481.853) | 
[53481.853 ; 56812.620) | @
[56812.620 ; 59994.902) | @@@@@@@@@@@@@@@@@@@@@
[59994.902 ; 63202.315) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in BenchmarksGame.FannkuchRedux_2

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
RunBench 139.87 ms 128.47 ms 0.92

graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'BenchmarksGame.FannkuchRedux_2*'

.

Payloads

Baseline
Compare

Histogram

BenchmarksGame.FannkuchRedux_2.RunBench(n: 10, expectedSum: 73196)

[125859763.972 ; 129405279.248) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[129405279.248 ; 132950794.524) | 
[132950794.524 ; 136496309.800) | 
[136496309.800 ; 139243266.729) | 
[139243266.729 ; 142788782.005) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[142788782.005 ; 146110151.217) | @
[146110151.217 ; 149655666.493) | @@@@@@@@
[149655666.493 ; 154840630.777) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[154840630.777 ; 160756334.049) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[160756334.049 ; 164323645.421) | @@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in System.Collections.IterateForEachNonGeneric<String>

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Stack 3.44 μs 3.06 μs 0.89

graph
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.Collections.IterateForEachNonGeneric&lt;String&gt;*'

.

Payloads

Baseline
Compare

Histogram

System.Collections.IterateForEachNonGeneric.Stack(Size: 512)

[3034.665 ; 3119.649) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[3119.649 ; 3232.782) | @@@@@@@@@@@@@@@@@@@@@@
[3232.782 ; 3360.710) | @@@@@@@@@@@@
[3360.710 ; 3557.268) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS ubuntu 18.04
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Improvemnts in System.Collections.IndexerSetReverse<Int32>

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Array 450.26 ns 227.79 ns 0.51

graph
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.Collections.IndexerSetReverse&lt;Int32&gt;*'

.

Payloads

Baseline
Compare

Histogram

System.Collections.IndexerSetReverse.Array(Size: 512)

[206.286 ; 247.885) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[247.885 ; 288.452) | 
[288.452 ; 329.020) | 
[329.020 ; 369.587) | 
[369.587 ; 410.155) | 
[410.155 ; 438.930) | 
[438.930 ; 479.498) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Regressions in System.Collections.ContainsFalse<String>

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Queue 1.01 ms 1.11 ms 1.10
Stack 1.15 ms 1.25 ms 1.09
List 1.02 ms 1.13 ms 1.11

graph
graph
graph
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.Collections.ContainsFalse&lt;String&gt;*'

.

Payloads

Baseline
Compare

Histogram

System.Collections.ContainsFalse.Queue(Size: 512)

[ 927254.841 ;  950657.287) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 950657.287 ;  974059.732) | 
[ 974059.732 ;  997462.178) | 
[ 997462.178 ; 1028099.390) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1028099.390 ; 1051501.835) | 
[1051501.835 ; 1083438.350) | 
[1083438.350 ; 1106840.796) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1106840.796 ; 1152411.029) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Collections.ContainsFalse.Stack(Size: 512)

[1024843.615 ; 1057836.385) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1057836.385 ; 1087445.079) | @@@@@@@@@@@@@
[1087445.079 ; 1115875.877) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1115875.877 ; 1159413.621) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1159413.621 ; 1188792.241) | @@@@@@@@@@@@@@
[1188792.241 ; 1226336.934) | @@@@@@@@@
[1226336.934 ; 1261161.892) | @@@@@@@@@@@@@@@@@@@@@@@@@@

System.Collections.ContainsFalse.List(Size: 512)

[ 928949.076 ;  952394.276) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[ 952394.276 ;  992128.780) | @
[ 992128.780 ; 1031617.483) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1031617.483 ; 1055062.683) | 
[1055062.683 ; 1077878.133) | 
[1077878.133 ; 1109744.641) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1109744.641 ; 1133189.841) | @@@@@@@@@@@@@@@@@@@@@@@@@@
[1133189.841 ; 1157386.261) | @@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

### Run Information
Architecture x64
OS Windows 10.0.18362
Baseline bb37a366a66684f7ed63e6651e102b1ffd9b152f
Compare 42009d1f33b52e40e5471d5c0d3ff4a8d5b2b83a

Regressions in System.Collections.IndexerSetReverse<String>

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
IList 2.25 μs 2.41 μs 1.07

graph
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.Collections.IndexerSetReverse&lt;String&gt;*'

.

Payloads

Baseline
Compare

Histogram

System.Collections.IndexerSetReverse.IList(Size: 512)

[1902.884 ; 1973.247) | @@@@@@@@@@@@@@
[1973.247 ; 2043.610) | 
[2043.610 ; 2138.290) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[2138.290 ; 2208.653) | 
[2208.653 ; 2313.105) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[2313.105 ; 2381.201) | @@@@@@@@
[2381.201 ; 2478.527) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[2478.527 ; 2557.592) | @@
[2557.592 ; 2627.955) | @@@@@@@
[2627.955 ; 2730.986) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

@DrewScoggins DrewScoggins added os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark arch-x64 labels Feb 19, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Feb 19, 2021
@danmoseley danmoseley added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 19, 2021
@kunalspathak kunalspathak changed the title [Perf] Regressions in various benchmarks from cloned loop inlining work [Perf] Impact on various benchmarks from not aligning cloned loop Feb 19, 2021
@kunalspathak
Copy link
Member

kunalspathak commented Feb 19, 2021

@JulieLeeMSFT, @AndyAyersMS - FYI

@kunalspathak
Copy link
Member

Related PR: #48090

@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Feb 19, 2021
@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Feb 19, 2021
@kunalspathak
Copy link
Member

Actionable item: For few benchmarks above, double check if the improvements are real from #48090

@kunalspathak
Copy link
Member

kunalspathak commented Apr 27, 2021

Most, if not all benchmarks are attributed to the data alignment problem:

https://pvscmdupload.blob.core.windows.net/reports/allTestHistory%2frefs%2fheads%2fmain_x64_ubuntu%2018.04%2fSystem.Collections.IterateFor(String).Span(Size%3a%20512).html

image

https://pvscmdupload.blob.core.windows.net/reports/allTestHistory%2frefs%2fheads%2fmain_x64_ubuntu%2018.04%2fSystem.Collections.IterateForEach(Int32).Array(Size%3a%20512).html

image

The stability is relatively less in FormatterUint32 benchmark because a loop gets aligned.

Assembly code of Utf8Formatter:TryFormatUInt64
       0F1F840000000000     align    [8 bytes]
						;; bbWeight=0.50 PerfScore 1.00
G_M65231_IG19:              ;; offset=01A0H
       4C8D4630             lea      r8, [rsi+48]
       48BACDCCCCCCCCCCCCCC mov      rdx, 0xCCCCCCCCCCCCCCCD
       488BC6               mov      rax, rsi
       48F7E2               mul      rdx:rax, rdx
       488BF2               mov      rsi, rdx
       48C1EE03             shr      rsi, 3
       413BCE               cmp      ecx, r14d
       0F830D020000         jae      G_M65231_IG45
       4863D1               movsxd   rdx, ecx
       488D04B6             lea      rax, [rsi+4*rsi]
       4803C0               add      rax, rax
       4C2BC0               sub      r8, rax
       44880413             mov      byte  ptr [rbx+rdx], r8b
       FFC9                 dec      ecx
       85C9                 test     ecx, ecx
       7FC5                 jg       SHORT G_M65231_IG19

https://pvscmdupload.blob.core.windows.net/reports/allTestHistory%2frefs%2fheads%2fmain_x64_ubuntu%2018.04%2fSystem.Buffers.Text.Tests.Utf8FormatterTests.FormatterUInt32(value%3a%2012345).html

image

FannkuchRedux_2: We do create cloned loops in this benchmark so this is an improvement.
Here is the diff.

To summarize, not all the improvements are because of cloned loops because there are some data alignment issues.

@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Projects
None yet
Development

No branches or pull requests

4 participants