Skip to content

Conversation

@xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Jun 12, 2025

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 12, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 12, 2025
@teo-tsirpanis teo-tsirpanis added area-System.Runtime and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 12, 2025
@MihaZupan
Copy link
Member

MihuBot/runtime-utils#1118

Method Toolchain Mean Error Ratio
ParseExactD Main 18.6149 ns 0.0806 ns 1.00
ParseExactD PR 14.8572 ns 0.0753 ns 0.80
ctor_str Main 18.5534 ns 0.0249 ns 1.00
ctor_str PR 15.2745 ns 0.3799 ns 0.82
Parse Main 18.6017 ns 0.0772 ns 1.00
Parse PR 14.7625 ns 0.0705 ns 0.79

@xtqqczze xtqqczze force-pushed the improve-decode-byte branch from dfc39fc to 012d58e Compare June 12, 2025 18:08
@vcsjones
Copy link
Member

There was a build break in main which is the source of these compilation errors. Merging in main will fix the compilation errors.

@xtqqczze
Copy link
Contributor Author

@MihuBot benchmark Perf_Guid -medium

@MihuBot
Copy link

MihuBot commented Jun 12, 2025

System.Tests.Perf_Guid
BenchmarkDotNet v0.14.1-nightly.20250107.205, Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish)
AMD EPYC 9V74, 1 CPU, 8 logical and 4 physical cores
MediumRun : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Job=MediumRun  IterationCount=15  LaunchCount=2
WarmupCount=10
Method Toolchain Mean Error Ratio Allocated Alloc Ratio
NewGuid Main 548.9893 ns 0.2231 ns 1.00 - NA
NewGuid PR 549.5465 ns 0.2342 ns 1.00 - NA
ctor_bytes Main 0.5641 ns 0.0043 ns 1.00 - NA
ctor_bytes PR 0.5682 ns 0.0047 ns 1.01 - NA
EqualsSame Main 0.0003 ns 0.0003 ns ? - ?
EqualsSame PR 0.0014 ns 0.0003 ns ? - ?
EqualsNotSame Main 0.0012 ns 0.0007 ns ? - ?
EqualsNotSame PR 0.0009 ns 0.0007 ns ? - ?
EqualsOperator Main 0.0007 ns 0.0004 ns ? - ?
EqualsOperator PR 0.0006 ns 0.0002 ns ? - ?
NotEqualsOperator Main 0.0002 ns 0.0002 ns ? - ?
NotEqualsOperator PR 0.0003 ns 0.0003 ns ? - ?
ParseExactD Main 19.3275 ns 0.4322 ns 1.00 - NA
ParseExactD PR 14.6864 ns 0.0145 ns 0.76 - NA
GuidToString Main 11.5308 ns 0.0785 ns 1.00 96 B 1.00
GuidToString PR 13.3686 ns 1.6937 ns 1.16 96 B 1.00
TryWriteBytes Main 0.1890 ns 0.0560 ns 1.20 - NA
TryWriteBytes PR 0.1955 ns 0.0568 ns 1.24 - NA
ctor_str Main 18.5711 ns 0.0830 ns 1.00 - NA
ctor_str PR 14.7165 ns 0.0583 ns 0.79 - NA
Parse Main 18.6136 ns 0.0802 ns 1.00 - NA
Parse PR 14.6805 ns 0.0282 ns 0.79 - NA
System.Text.Json.Tests.Perf_Guids
BenchmarkDotNet v0.14.1-nightly.20250107.205, Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish)
AMD EPYC 9V74, 1 CPU, 8 logical and 4 physical cores
MediumRun : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Job=MediumRun  OutlierMode=DontRemove  IterationCount=15
LaunchCount=2  MemoryRandomization=True  WarmupCount=10
Method Toolchain Formatted SkipValidation Mean Error Ratio Allocated Alloc Ratio
WriteGuids Main False False 614.5 μs 4.19 μs 1.00 8.63 KB 1.00
WriteGuids PR False False 609.1 μs 1.21 μs 0.99 8.63 KB 1.00
WriteGuids Main False True 585.8 μs 1.01 μs 1.00 8.63 KB 1.00
WriteGuids PR False True 585.9 μs 1.23 μs 1.00 8.63 KB 1.00
WriteGuids Main True False 846.8 μs 22.95 μs 1.00 8.63 KB 1.00
WriteGuids PR True False 810.1 μs 0.55 μs 0.96 8.63 KB 1.00
WriteGuids Main True True 799.2 μs 0.76 μs 1.00 8.63 KB 1.00
WriteGuids PR True True 799.9 μs 1.72 μs 1.00 8.63 KB 1.00

@xtqqczze
Copy link
Contributor Author

xtqqczze commented Jun 12, 2025

Method Toolchain Mean Error Ratio Allocated Alloc Ratio
ParseExactD Main 19.3275 ns 0.4322 ns 1.00 - NA
ParseExactD PR 14.6864 ns 0.0145 ns 0.76 - NA
ctor_str Main 18.5711 ns 0.0830 ns 1.00 - NA
ctor_str PR 14.7165 ns 0.0583 ns 0.79 - NA
Parse Main 18.6136 ns 0.0802 ns 1.00 - NA
Parse PR 14.6805 ns 0.0282 ns 0.79 - NA

@xtqqczze
Copy link
Contributor Author

@MihuBot benchmark Perf_Guid -medium -arm

@MihuBot
Copy link

MihuBot commented Jun 12, 2025

System.Tests.Perf_Guid
BenchmarkDotNet v0.14.1-nightly.20250107.205, Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Unknown processor, 8 physical cores
MediumRun : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Job=MediumRun  IterationCount=15  LaunchCount=2
WarmupCount=10
Method Toolchain Mean Error Ratio Allocated Alloc Ratio
NewGuid Main 360.7914 ns 0.2896 ns 1.00 - NA
NewGuid PR 360.4806 ns 0.2844 ns 1.00 - NA
ctor_bytes Main 0.6046 ns 0.0232 ns 1.00 - NA
ctor_bytes PR 0.5415 ns 0.0002 ns 0.90 - NA
EqualsSame Main 0.3042 ns 0.0399 ns 1.03 - NA
EqualsSame PR 0.1276 ns 0.0856 ns 0.43 - NA
EqualsNotSame Main 0.1779 ns 0.1209 ns ? - ?
EqualsNotSame PR 0.0000 ns 0.0000 ns ? - ?
EqualsOperator Main 0.2288 ns 0.0908 ns 1.52 - NA
EqualsOperator PR 0.2377 ns 0.0930 ns 1.58 - NA
NotEqualsOperator Main 0.4406 ns 0.0009 ns 1.000 - NA
NotEqualsOperator PR 0.0000 ns 0.0000 ns 0.000 - NA
ParseExactD Main 18.5836 ns 0.0154 ns 1.00 - NA
ParseExactD PR 13.9214 ns 0.0105 ns 0.75 - NA
GuidToString Main 11.3054 ns 0.0902 ns 1.00 96 B 1.00
GuidToString PR 11.2633 ns 0.0959 ns 1.00 96 B 1.00
TryWriteBytes Main 0.0000 ns 0.0000 ns ? - ?
TryWriteBytes PR 0.0000 ns 0.0000 ns ? - ?
ctor_str Main 18.8576 ns 0.0353 ns 1.00 - NA
ctor_str PR 13.9297 ns 0.0096 ns 0.74 - NA
Parse Main 18.8300 ns 0.0395 ns 1.00 - NA
Parse PR 13.9466 ns 0.0549 ns 0.74 - NA
System.Text.Json.Tests.Perf_Guids
BenchmarkDotNet v0.14.1-nightly.20250107.205, Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Unknown processor, 8 physical cores
MediumRun : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Job=MediumRun  OutlierMode=DontRemove  IterationCount=15
LaunchCount=2  MemoryRandomization=True  WarmupCount=10
Method Toolchain Formatted SkipValidation Mean Error Ratio Allocated Alloc Ratio
WriteGuids Main False False 708.2 μs 2.76 μs 1.00 8.63 KB 1.00
WriteGuids PR False False 709.6 μs 2.94 μs 1.00 8.63 KB 1.00
WriteGuids Main False True 685.1 μs 2.12 μs 1.00 8.63 KB 1.00
WriteGuids PR False True 681.6 μs 3.56 μs 0.99 8.63 KB 1.00
WriteGuids Main True False 1,083.1 μs 4.41 μs 1.00 17.13 KB 1.00
WriteGuids PR True False 1,079.9 μs 3.04 μs 1.00 17.13 KB 1.00
WriteGuids Main True True 1,091.8 μs 2.72 μs 1.00 17.13 KB 1.00
WriteGuids PR True True 1,093.9 μs 3.57 μs 1.00 17.13 KB 1.00

@xtqqczze
Copy link
Contributor Author

Method Toolchain Mean Error Ratio Allocated Alloc Ratio
ParseExactD Main 18.5836 ns 0.0154 ns 1.00 - NA
ParseExactD PR 13.9214 ns 0.0105 ns 0.75 - NA
ctor_str Main 18.8576 ns 0.0353 ns 1.00 - NA
ctor_str PR 13.9297 ns 0.0096 ns 0.74 - NA
Parse Main 18.8300 ns 0.0395 ns 1.00 - NA
Parse PR 13.9466 ns 0.0549 ns 0.74 - NA

@xtqqczze
Copy link
Contributor Author

@MihuBot benchmark Perf_Guid -medium

@MihuBot
Copy link

MihuBot commented Jun 13, 2025

System.Tests.Perf_Guid
BenchmarkDotNet v0.14.1-nightly.20250107.205, Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish)
AMD EPYC 9V74, 1 CPU, 8 logical and 4 physical cores
MediumRun : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Job=MediumRun  IterationCount=15  LaunchCount=2
WarmupCount=10
Method Toolchain Mean Error Ratio Allocated Alloc Ratio
NewGuid Main 548.0208 ns 0.6214 ns 1.00 - NA
NewGuid PR 548.1821 ns 0.4214 ns 1.00 - NA
ctor_bytes Main 0.5594 ns 0.0026 ns 1.00 - NA
ctor_bytes PR 0.6190 ns 0.0425 ns 1.11 - NA
EqualsSame Main 0.0005 ns 0.0004 ns ? - ?
EqualsSame PR 0.0002 ns 0.0001 ns ? - ?
EqualsNotSame Main 0.0004 ns 0.0004 ns ? - ?
EqualsNotSame PR 0.0016 ns 0.0004 ns ? - ?
EqualsOperator Main 0.0002 ns 0.0001 ns ? - ?
EqualsOperator PR 0.0001 ns 0.0002 ns ? - ?
NotEqualsOperator Main 0.0004 ns 0.0005 ns ? - ?
NotEqualsOperator PR 0.0006 ns 0.0005 ns ? - ?
ParseExactD Main 18.1742 ns 0.3769 ns 1.00 - NA
ParseExactD PR 15.5857 ns 0.0523 ns 0.86 - NA
GuidToString Main 11.6960 ns 0.3840 ns 1.00 96 B 1.00
GuidToString PR 11.5414 ns 0.0438 ns 0.99 96 B 1.00
TryWriteBytes Main 0.1998 ns 0.0494 ns 1.16 - NA
TryWriteBytes PR 0.1964 ns 0.0527 ns 1.14 - NA
ctor_str Main 18.5513 ns 0.0808 ns 1.00 - NA
ctor_str PR 15.4892 ns 0.0945 ns 0.83 - NA
Parse Main 18.6132 ns 0.0761 ns 1.00 - NA
Parse PR 15.4071 ns 0.0745 ns 0.83 - NA
System.Text.Json.Tests.Perf_Guids
BenchmarkDotNet v0.14.1-nightly.20250107.205, Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish)
AMD EPYC 9V74, 1 CPU, 8 logical and 4 physical cores
MediumRun : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Job=MediumRun  OutlierMode=DontRemove  IterationCount=15
LaunchCount=2  MemoryRandomization=True  WarmupCount=10
Method Toolchain Formatted SkipValidation Mean Error Ratio Allocated Alloc Ratio
WriteGuids Main False False 609.9 μs 2.02 μs 1.00 8.63 KB 1.00
WriteGuids PR False False 610.1 μs 1.06 μs 1.00 8.63 KB 1.00
WriteGuids Main False True 585.4 μs 0.85 μs 1.00 8.63 KB 1.00
WriteGuids PR False True 586.1 μs 1.33 μs 1.00 8.63 KB 1.00
WriteGuids Main True False 811.5 μs 0.52 μs 1.00 8.63 KB 1.00
WriteGuids PR True False 813.0 μs 0.93 μs 1.00 8.63 KB 1.00
WriteGuids Main True True 798.5 μs 1.42 μs 1.00 8.63 KB 1.00
WriteGuids PR True True 799.8 μs 1.17 μs 1.00 8.63 KB 1.00

@xtqqczze
Copy link
Contributor Author

Method Toolchain Mean Error Ratio Allocated Alloc Ratio
ParseExactD Main 18.1742 ns 0.3769 ns 1.00 - NA
ParseExactD PR 15.5857 ns 0.0523 ns 0.86 - NA
ctor_str Main 18.5513 ns 0.0808 ns 1.00 - NA
ctor_str PR 15.4892 ns 0.0945 ns 0.83 - NA
Parse Main 18.6132 ns 0.0761 ns 1.00 - NA
Parse PR 15.4071 ns 0.0745 ns 0.83 - NA

@xtqqczze xtqqczze marked this pull request as ready for review June 13, 2025 13:38
@MihaZupan
Copy link
Member

Is this PR superseded by #116821?

Copy link
Member

@tannergooding tannergooding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

I'm not convinced the churn is worth it here for 3ns, so will defer to input from @EgorBo and @MihaZupan on whether we should take or close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Runtime community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants