develooper Front page | perl.perl5.porters | Postings from August 2021

Re: PSC #033 2021-08-13

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
August 30, 2021 10:09
Subject:
Re: PSC #033 2021-08-13
Message ID:
YSyuMxEN3uZKY8OQ@iabyn.com
On Mon, Aug 16, 2021 at 12:41:54AM +0100, Philip R Brenan wrote:
> The Intel Emulator:
> https://software.intel.com/content/www/us/en/develop/articles/intel-software-development-emulator.html
> gives an exact count of the instructions executed by a program.  Please
> consider using the number of instructions executed (amongst many other
> useful statistics)  to see whether a proposed change is going to increase
> or decrease the number of instructions executed and thus have a possibly
> negative or positive effect on execution speed?


We already have a tool, Porting/bench.pl, which uses cachegrind to
count the total number of instructions, memory reads, branches etc that
small snippets of code execute. It is sensitive to very small changes
in the code (like removing a conditional) and is almost completely immune
to noise (such as CPU load). It can run in parallel on as many CPUs as you
have, and can compare multiple perl binaries.

There is a companion file, t/perf/benchmarks, which currently contains
around 400 benchmarks (although it would benefit from many more being
added).


-- 
Indomitable in retreat, invincible in advance, insufferable in victory
    -- Churchill on Montgomery

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About