Is there a way to benchmark/profile portably?

Dennis dkorpel at gmail.com
Thu May 7 11:06:17 UTC 2020


On Thursday, 7 May 2020 at 10:21:07 UTC, Dukc wrote:
> Is there some way to measure the performance of a function so 
> that the results will be same in different computers (all x86, 
> but otherwise different processors)? I'm thinking of making a 
> test suite that could find performance regressions 
> automatically.

You can make a reference program that you use to get a measure 
for how fast the computer is that you run the benchmark on. Then 
you can use that to scale your actual benchmark results.

When testing regressions there's a fairly obvious choice for this 
reference program: the old version. You can compare those results 
with the new version and report the relative difference.


More information about the Digitalmars-d-learn mailing list