develooper Front page | perl.perl5.porters | Postings from February 2013


Thread Previous | Thread Next
Steffen Mueller
February 27, 2013 21:33
Message ID:
On 02/27/2013 09:59 PM, chromatic wrote:
> On Wednesday, February 27, 2013 08:50:59 PM Nicholas Clark wrote:
>> Yes, I thought this. I certainly tried it for one of the ops a long time
>> ago. I hit exactly the problem you did - I couldn't measure the difference.
> The only worthwhile approach I've ever found is to count the instructions
> executed by callgrind. Even that varies--especially as it's instructions for a
> fake processor--but dramatic improvements make themselves visible.

That and running things in a hot loop in a separate process over and 
over again, then looking at a histogram of the results. Very 
unscientific, but again, significant things tend to stand out. Human 
intuition (particularly when trained a bit) is quite good at spotting 
such differences.

Anyway: Callgrind not (yet) done in this case. But any difference is 
still going to be small. Callgrind probably also doesn't really 
highlight cost of branch (mis-)prediction fairly, does it?
Actually, on this one, maybe cachegrind is at least as interesting.


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