How to order BenchmarkDotNet results from fastest to slowest

By default BenchmarkDotNet outputs the results of benchmarks as they are coded in the benchmark class file.

If you wish to order them from the fastest to the slowest or vice versa you can do so by adding the Orderer attribute to your class and setting the SummaryOrderPolicy enum to FastestToSlowest or SlowestToFastest.

For example …

Without explicit sort order

With explicit FastestToSlowest sort order

Leave a Reply

Your email address will not be published. Required fields are marked *