From be53d634472ae6e2e839cd9fd6ca0fde6a91ccfd Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Thu, 5 Mar 2026 16:09:50 -0600 Subject: [PATCH] Re-enable EvaluateOverhead to subtract method-call overhead from benchmark results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BenchmarkDotNet PR dotnet/BenchmarkDotNet#3007 (merged Feb 16, 2026) changed the EvaluateOverhead default from true to false. This means BDN no longer runs idle/overhead iterations to measure and subtract the cost of the benchmark method call itself. On native JIT platforms the call overhead is <1ns and imperceptible, but on interpreted WASM it is ~8-10ns and on AOT WASM ~1-3ns. Combined with a 2.5-month WASM perf data gap (Dec 5, 2025 – Feb 26, 2026), this caused the auto-filer to report 2300+ false regressions: - dotnet/perf-autofiling-issues#69444: 1416 interpreted WASM regressions - dotnet/perf-autofiling-issues#69430: 864 AOT WASM regressions The regression ratio inversely correlates with baseline duration — a constant additive overhead, not a real runtime change. Re-enabling EvaluateOverhead restores the previous measurement methodology for all platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/harness/BenchmarkDotNet.Extensions/RecommendedConfig.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/harness/BenchmarkDotNet.Extensions/RecommendedConfig.cs b/src/harness/BenchmarkDotNet.Extensions/RecommendedConfig.cs index 40aa5f87fbe..32a093c61fb 100644 --- a/src/harness/BenchmarkDotNet.Extensions/RecommendedConfig.cs +++ b/src/harness/BenchmarkDotNet.Extensions/RecommendedConfig.cs @@ -34,6 +34,7 @@ public static IConfig Create( .WithIterationTime(TimeInterval.FromMilliseconds(250)) // the default is 0.5s per iteration, which is slighlty too much for us .WithMinIterationCount(15) .WithMaxIterationCount(20) // we don't want to run more that 20 iterations + .WithEvaluateOverhead(true) // BDN changed the default to false; re-enable to subtract method-call overhead from results .DontEnforcePowerPlan(); // make sure BDN does not try to enforce High Performance power plan on Windows // See https://github.com/dotnet/roslyn/issues/42393