-
Notifications
You must be signed in to change notification settings - Fork 273
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
Add performance test for XmlSerializationWriter.WriteTypedPrimitive #2623
base: main
Are you sure you want to change the base?
Add performance test for XmlSerializationWriter.WriteTypedPrimitive #2623
Conversation
Hmmm, strange exception. [2022/09/30 11:29:37][INFO] // BeforeActualRun |
|
||
private readonly MyXmlSerializationWriter _writer = new MyXmlSerializationWriter(); | ||
|
||
private static readonly DateTime Now = new DateTime(2022, 9, 30, 9, 4, 15, DateTimeKind.Utc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these shouldn't be static readonly
in order to prevent some JIT optimization that otherwise may occur, and to have the benchmarks more realistic (i.e. non constant inputs).
src/benchmarks/micro/libraries/System.Private.Xml/Perf.XmlSerializationWriter.cs
Outdated
Show resolved
Hide resolved
I receive some warning at the end : // * Warnings * What should I change to solve it ? |
Benchmark used in dotnet/runtime#76436
Maybe merge can wait until owners agree that it is good optimization and deserves benchmark.