Skip to content

Conversation

@TrayanZapryanov
Copy link
Contributor

@TrayanZapryanov TrayanZapryanov commented Feb 6, 2022

Related to improvements done in Issue 64868

Results from my PC

// * Summary *

BenchmarkDotNet=v0.13.1.1689-nightly, OS=Windows 10 (10.0.19043.1466/21H1/May2021Update)
11th Gen Intel Core i9-11900K 3.50GHz, 1 CPU, 16 logical and 8 physical cores
.NET SDK=6.0.101
[Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
Job-DJFTTG : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT

PowerPlanMode=00000000-0000-0000-0000-000000000000 Arguments=/p:DebugType=portable,-bl:benchmarkdotnet.binlog IterationTime=250.0000 ms
MaxIterationCount=20 MinIterationCount=15 WarmupCount=1

Before

Method Mean Error StdDev Median Min Max Gen 0 Allocated
DateTime_ToString 79.56 ns 1.238 ns 0.967 ns 79.64 ns 77.60 ns 81.20 ns 0.0486 408 B
DateTime_ToString_Local 243.25 ns 1.684 ns 1.576 ns 243.55 ns 241.02 ns 245.91 ns 0.0541 456 B
DateTime_ToString_Unspecified 76.37 ns 0.422 ns 0.394 ns 76.41 ns 75.65 ns 77.01 ns 0.0487 408 B
DateTime_ToString_RoundtripKind 78.79 ns 0.868 ns 0.769 ns 78.70 ns 77.46 ns 80.15 ns 0.0485 408 B
TimeSpan_ToString 62.96 ns 0.485 ns 0.454 ns 62.88 ns 62.09 ns 63.75 ns 0.0200 168 B

After

Method Mean Error StdDev Median Min Max Gen 0 Allocated
DateTime_ToString 54.50 ns 0.304 ns 0.270 ns 54.55 ns 53.98 ns 54.99 ns 0.0096 80 B
DateTime_ToString_Local 187.15 ns 2.430 ns 2.029 ns 187.60 ns 180.93 ns 189.17 ns 0.0099 88 B
DateTime_ToString_Unspecified 49.17 ns 0.523 ns 0.464 ns 49.24 ns 47.62 ns 49.50 ns 0.0095 80 B
DateTime_ToString_RoundtripKind 53.01 ns 0.768 ns 0.718 ns 53.34 ns 51.73 ns 53.67 ns 0.0095 80 B
TimeSpan_ToString 41.16 ns 0.206 ns 0.192 ns 41.22 ns 40.55 ns 41.31 ns 0.0065 56 B

@TrayanZapryanov
Copy link
Contributor Author

I am sorry but I was not able to check against 7.0. I've tried to follow guides, but couldn't find how to build.
I am receiving this error: >C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0.

@TrayanZapryanov
Copy link
Contributor Author

@TrayanZapryanov no worries, it's a little unusual. Can you install the latest nightly 7.0 SDK from https://github.com/dotnet/installer?

https://github.com/dotnet/performance/blob/b73570d6eea0e85003ae0b6d018c5c46eb7daef0/src/benchmarks/micro/README.md should link to this https://github.com/dotnet/performance/blob/b73570d6eea0e85003ae0b6d018c5c46eb7daef0/docs/prerequisites.md#net-core-sdk

I will clarify the docs as soon as we figure out where you tripped up.

Thanks for the hint - only installer was missing.
I was able to build against my Debug build and soon will test against Release too.

@TrayanZapryanov
Copy link
Contributor Author

TrayanZapryanov commented Feb 7, 2022

One more thing that I was not able to solve is how to force runtime build to create Release ""testhost"" folder.
I've tried :
build.cmd -rc Release
build.cmd clr+libs -rc Release

but always found net7.0-windows-Debug-x64 after build

Edit:
You can ignore- I've figured it how :)
Just was surprised that ""clr+libs -rc Release"" means release clr and dbug libs :)

@TrayanZapryanov
Copy link
Contributor Author

One last thing that I cannot understand is why new results are slower : they have better memory profile....
Also I used following command to build and run benchmarks:
dotnet run -c Release -f net7.0 --filter XmlConvert --coreRun C:\Work\Github\TZ_runtime\artifacts\bin\testhost\net7.0-windows-Release-x64\shared\Microsoft.NETCore.App\7.0.0\CoreRun.exe

@danmoseley
Copy link
Member

Just was surprised that ""clr+libs -rc Release"" means release clr and dbug libs :)

Yup, it's just the defaults. I always spell it out explicitly -- -lc Debug ...

Copy link
Member

@danmoseley danmoseley left a comment

Choose a reason for hiding this comment

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

thanks! I fixed some tabs that crept in, and removed unnecessary setup.

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @TrayanZapryanov !

@adamsitnik adamsitnik merged commit a74ff5e into dotnet:main Feb 9, 2022
@TrayanZapryanov TrayanZapryanov deleted the System.Private.Xml branch February 10, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants