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 -7%] System.Text.Perf_Utf8Encoding.GetBytes #45554

Closed
DrewScoggins opened this issue Dec 3, 2020 · 12 comments
Closed

[Perf -7%] System.Text.Perf_Utf8Encoding.GetBytes #45554

DrewScoggins opened this issue Dec 3, 2020 · 12 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) 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 d73c65ed402fad658c39d78773d181c4459b62c8
Compare fe80a77dac16de2451be60563123b8fbf8ea8355

Regressions in System.Text.Perf_Utf8Encoding

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
GetBytes 91.13 μs 97.86 μs 1.07

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.Text.Perf_Utf8Encoding*'

.

Payloads

Baseline
Compare

Histogram

System.Text.Perf_Utf8Encoding.GetBytes(Input: Cyrillic)

[88821.971 ; 91127.201) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[91127.201 ; 94296.831) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[94296.831 ; 97253.700) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[97253.700 ; 99712.542) | @@@@@@@@@@@@@@@@@@@@@@@@

Docs

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

@DrewScoggins DrewScoggins added os-linux Linux OS (any supported distro) tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark arch-x64 labels Dec 3, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Text.Encoding untriaged New issue has not been triaged by the area owner labels Dec 3, 2020
@ghost
Copy link

ghost commented Dec 3, 2020

Tagging subscribers to this area: @tarekgh, @krwq
See info in area-owners.md if you want to be subscribed.

Issue Details

Run Information

Architecture x64
OS ubuntu 18.04
Baseline d73c65ed402fad658c39d78773d181c4459b62c8
Compare fe80a77dac16de2451be60563123b8fbf8ea8355

Regressions in System.Text.Perf_Utf8Encoding

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
GetBytes 91.13 μs 97.86 μs 1.07

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.Text.Perf_Utf8Encoding*'

.

Payloads

Baseline
Compare

Histogram

System.Text.Perf_Utf8Encoding.GetBytes(Input: Cyrillic)

[88821.971 ; 91127.201) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[91127.201 ; 94296.831) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[94296.831 ; 97253.700) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[97253.700 ; 99712.542) | @@@@@@@@@@@@@@@@@@@@@@@@

Docs

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

Author: DrewScoggins
Assignees: -
Labels:

arch-x64, area-System.Text.Encoding, os-linux, tenet-performance, tenet-performance-benchmarks, untriaged

Milestone: -

@tarekgh tarekgh removed the untriaged New issue has not been triaged by the area owner label Dec 3, 2020
@tarekgh
Copy link
Member

tarekgh commented Dec 3, 2020

@GrabYourPitchforks did we have any recent change in this area? or you think this is related to codegen?

@tarekgh tarekgh added this to the Future milestone Dec 3, 2020
@GrabYourPitchforks
Copy link
Member

There weren't any recent changes to System.Text here. There were two JIT changes (7031456 and 3e65d68) between baseline + compare, but I don't know how to reason about whether those JIT changes may have impacted these scenarios. If other perf tests started showing regressions at around the same time then it might finger those.

@danmoseley
Copy link
Member

@DrewScoggins were there any other regressions at the same point?

@danmoseley
Copy link
Member

cc @AndyAyersMS and @sandreenko who made those changes in case something pops for them.

@DrewScoggins
Copy link
Member Author

Not that we saw, no.

@sandreenko
Copy link
Contributor

It could have been caused by 3e65d68, the description is here #43130 (comment).
Could you please mark it as codegen and assign it to me? I will try to find a solution after we setup arm64 apple testing in ci.

@GrabYourPitchforks
Copy link
Member

Check also the comments for DrewScoggins/performance-2#3543. There's some discussion there that the JIT may have experienced regressions around this time frame.

@danmoseley danmoseley added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed area-System.Text.Encoding labels Dec 11, 2020
@danmoseley
Copy link
Member

@sandreenko thanks - I've assigned to you.

@JulieLeeMSFT JulieLeeMSFT assigned EgorBo and unassigned sandreenko Oct 5, 2022
@EgorBo
Copy link
Member

EgorBo commented Oct 5, 2022

Closing this as we fixed it via PGO static data from training sessions where we added non en-us inputs including cyrilic e.g.
image

@EgorBo EgorBo closed this as completed Oct 5, 2022
@danmoseley
Copy link
Member

@EgorBo for my reference, where do we store training scenarios?

@EgorBo
Copy link
Member

EgorBo commented Oct 6, 2022

@danmoseley https://dev.azure.com/dnceng/internal/_git/dotnet-optimization and the PR that fixed this issue is https://dev.azure.com/dnceng/internal/_git/dotnet-optimization/pullrequest/24609?_a=files

@ghost ghost locked as resolved and limited conversation to collaborators Nov 5, 2022
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) tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Projects
None yet
Development

No branches or pull requests

7 participants