|Version 1 (modified by batterseapower, 6 years ago) (diff)|
Benchmarking an optimisation
To test your whizzy new optimisation with nofib, you will want to:
- Build the inplace stage2 compiler with a flag that controls whether it runs or not
- Run the nofib suite with that flag on and then off, and compare the two runs:
make -k >& log1 make -k EXTRA_HC_OPTS=-fenable-cool-optimisation >& log2 nofib-analyse log1 log2
The output of the nofib-analyse tool is quite readable. Be warned: missing values in the output typically mean that the benchmark crashed and may indicate a problem with your optimisation.
If the comparison identifies any particularly bad benchmark results, you can run them individually by changing into their directory and running something like:
EXTRA_HC_OPTS="-fenable-cool-optimisation -ddump-simpl" make
You can add whatever dumping flags you need to see the output and understand what is going wrong.