dotnet / runtime

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

[perf] Microsoft.Extensions** performance regressions in Mono AOT x64 microbenchmarks from Preview 5 to Preview 7 #89252

Closed kotlarmilos closed 3 months 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
Microsoft.Extensions.Primitives.StringSegmentBenchmark.LastIndexOf 14.61 47.51 225.19
Microsoft.Extensions.Primitives.Performance.StringValuesBenchmark.Count_String 1.31 1.53 16.79
Microsoft.Extensions.Logging.EventSourceLogger.NestedScopes_TwoMessages(HasSubscribers: False, Json: False) 135.42 145.7 7.59
Microsoft.Extensions.DependencyInjection.TimeToFirstService.Transient(Mode: Runtime) 7850.04 11234.83 43.12
Microsoft.Extensions.DependencyInjection.TimeToFirstService.Transient(Mode: Dynamic) 7739.43 11039.51 42.64
Microsoft.Extensions.DependencyInjection.TimeToFirstService.Singleton(Mode: Dynamic) 7861.42 11568.24 47.15
kotlarmilos commented 1 year ago

@JamesNK We are trying to narrow down changes between May 2nd, 2023 and July 19th, 2023 that may have caused the regressions. If you are aware of any changes that might have potentially caused these regressions, please let us know.

There are recent changes for debugger support https://github.com/dotnet/runtime/pull/88960 or https://github.com/dotnet/runtime/pull/88082, but it is unlikely they have caused the regressions.

steveisok commented 3 months ago

It's not likely we will take action on these.