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

Re: PSC #033 2021-08-13

Thread Previous | Thread Next
Dave Mitchell
August 30, 2021 10:09
Re: PSC #033 2021-08-13
Message ID:
On Mon, Aug 16, 2021 at 12:41:54AM +0100, Philip R Brenan wrote:
> The Intel Emulator:
> 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/, 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

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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About