When benchmarking across different runtime configurations (e.g., comparing .NET Core vs. .NET Framework vs. Mono), you can designate one specific job as the reference point by setting baseline = true in its configuration.
When a baseline is defined, BenchmarkDotNet adds Ratio and RatioSD columns to the summary table. The Ratio column shows the performance of each job relative to the baseline (where the baseline itself has a ratio of 1.00). A ratio less than 1.00 indicates the job is faster than the baseline, while a ratio greater than 1.00 indicates it is slower.
// Example of marking a job as the baseline in a Benchmark class
[Config(typeof(Config))]
public class IntroJobBaseline
{
private class Config : ManualConfig
{
public Config()
{
// Define multiple jobs, marking one as the baseline
AddJob(Job.Default.WithId("Clr").WithBaseline(true));
AddJob(Job.Default.WithId("Core"));
AddJob(Job.Default.WithId("Mono"));
}
}
[Benchmark]
public void SplitJoin()
{
// ... implementation ...
}
}