This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add Porting/bench.pl
authorDavid Mitchell <davem@iabyn.com>
Fri, 14 Nov 2014 12:18:12 +0000 (12:18 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 29 Nov 2014 23:16:54 +0000 (23:16 +0000)
commit9e7973fa06e83f9e8592f277685d066e2ff6abef
tree68433a64a990490ca494d1c25011beb99a868814
parent8b4fb3c6d41d4b5fcb35eae18a732259a0ebce34
add Porting/bench.pl

This tool runs 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 or running tests in
parallel. 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.

This commit also changes the format of t/perf/benchmarks slightly; it
becomes an AoH rather than a HoH (to allow checking for duplicate keys),
and the test names themselves become a :: hierarchy.
MANIFEST
Porting/README.pod
Porting/bench.pl [new file with mode: 0755]
Porting/exec-bit.txt
pod/perlhack.pod
t/perf/benchmarks
t/perf/benchmarks.t
t/perf/opcount.t
t/porting/bench.t [new file with mode: 0644]