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

Re: [perl #116188] [PATCH] hv.c: add some SvREFCNT_dec_NN andS_hv_free_ent_ret NULL check removal

Andy Dougherty
January 29, 2013 13:02
Re: [perl #116188] [PATCH] hv.c: add some SvREFCNT_dec_NN andS_hv_free_ent_ret NULL check removal
Message ID:
On Fri, 25 Jan 2013, bulk88 via RT wrote:

> On Fri Jan 25 12:44:16 2013, doughera wrote:
> > It looks like this patch is doing good things -- avoiding redundant NULL 
> > checks, avoiding duplicating a test, removing an unnecessary context, 
> > etc., and doing it in a set of functions that gets called fairly often.  
> > However, I found that it made no difference in performance in running a 
> > pattern matching program similar to metaconfig, and (under -O3) the new 
> > object files are actually larger than the old ones.
> > 
> I would say removing a null check is unmeasurable unless you are using
> rdtsc. Can you post before and after perl binaries, and the perf numbers
> you got in detail? I'd like to see myself how the object files got larger.

I'm afraid I have no idea what 'rdtsc' is, nor what you mean by 'perf 
numbers'.  In any case, I no longer have all the files on hand and doubt 
its worth pursuing.

> I use -O1. Are you using a threaded or unthreaded perl? is your sun x86
> or sparc?

There are too many combinations.  Depending on what else is going on, I 
have access to a SPARC which can run Sun's cc or gcc, Solaris on amd64 
which runs Sun's cc, and Linux on both x86 and amd64, which can run either 
gcc or Sun's cc.  Occasionally, I have access to various *BSDs, though 
they all use gcc so I didn't bother checking with them.  In this case, I 
tried a variety of threaded and unthreaded builds on Linux, and unthreaded 
on SPARC/cc.  There are also different optimization flags, depending on 
what you want to optimize for (e.g. size vs. speed) and how aggressively 
you want to do so.  

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