dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15k stars 4.67k forks source link

[perf] System.IO.** performance regressions in Mono AOT x64 microbenchmarks from Preview 5 to Preview 7 #89249

Closed kotlarmilos closed 1 month ago

kotlarmilos commented 1 year ago

Description

The following performance regressions occurred between the Preview 4 snapshot (May 2nd, 2023) and Preview 7 snapshot (July 19th, 2023).

The configuration used for the benchmarks is Mono AOT with LLVM on x64 ubuntu 18.04.

Name Baseline Value Compare Value % Difference
System.IO.Tests.StringReaderReadLineTests.ReadLine(LineLengthRange: [ 9, 32]) 59315.82 85012.82 43.32
System.IO.Tests.StreamReaderReadToEndTests.ReadToEnd(LineLengthRange: [ 1, 8]) 302363619.79 393413008.92 30.11
System.IO.Tests.StreamReaderReadLineTests.ReadLine(LineLengthRange: [ 33, 128]) 120659.04 148821.05 23.34
System.IO.Tests.Perf_StreamWriter.WritePartialCharArray(writeLength: 100) 7040317380.69 7436111839.2 5.62
System.IO.Tests.Perf_Path.GetTempPath 475.3 528.5 11.19
System.IO.Tests.Perf_Path.GetFullPathForLegacyLength 892.08 988.29 10.78
System.IO.Tests.Perf_Path.GetFileNameWithoutExtension 72.17 130.12 80.3
System.IO.Tests.Perf_FileStream.Read_NoBuffering(fileSize: 1048576, userBufferSize: 16384, options: None) 89284.96 96396 7.96
System.IO.Tests.Perf_FileInfo.ctor_str 260.26 287.06 10.3
System.IO.Tests.Perf_File.ReadAllLines 49709.46 61925.36 24.57
System.IO.Tests.Perf_Directory.EnumerateFiles 6526091.4 7960634.37 21.98
System.IO.Tests.BinaryWriterTests.WriteUInt64 17.46 18.49 5.9
System.IO.Tests.BinaryWriterTests.WriteSingle 16.59 17.65 6.39
kotlarmilos commented 1 year ago

@MihaZupan Some of them may have regressed in https://github.com/dotnet/runtime/pull/78895.

MihaZupan commented 1 year ago

That change only affected the CreateStackTraceString method, which I doubt is used in any of these benchmarks.

steveisok commented 1 month ago

Since this is about .NET 8 preview regressions, there's not a whole lot of action we can take. Closing.