Add performance test for XmlSerializationWriter.WriteTypedPrimitive#2623
Add performance test for XmlSerializationWriter.WriteTypedPrimitive#2623TrayanZapryanov wants to merge 5 commits intodotnet:mainfrom
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.
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.