View on
Steve Hay > perl >


Annotate this POD


Source   Latest Release: perl-5.27.3

NAME ^ - Compare the performance of perl code snippets across multiple perls.


    # Basic: run the tests in t/perf/benchmarks against two or
    # more perls [options] perl1[=label1] perl2[=label2] ...

    # Run's own built-in sanity tests --action=selftest


By default, will run code snippets found in t/perf/benchmarks (or similar) under cachegrind, in order to calculate how many instruction reads, data writes, branches, cache misses, etc. that one execution of the snippet uses. It will run them against two or more perl executables and show how much each test has gotten better or worse.

It is modelled on the perlbench tool, but since it measures instruction reads etc., rather than timings, it is much more precise and reproducible. It is also considerably faster, and is capable of running tests in parallel (with -j). Rather than displaying a single relative percentage per test/perl combination, it displays values for 13 different measurements, such as instruction reads, conditional branch misses etc.

There are options to write the raw data to a file, and to read it back. This means that you can view the same run data in different views with different selection and sort options.

The optional =label after each perl executable is used in the display output.


syntax highlighting: