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

Re: PL_sv_objcount

Thread Previous | Thread Next
March 1, 2013 11:57
Re: PL_sv_objcount
Message ID:
Steffen Mueller wrote:
> On 02/28/2013 10:14 PM, bulk88 wrote:
>> Nicholas Clark wrote:
>>> Pretty much *any* real world code of any form is going to end up with
>>> PL_sv_objcount non-zero at destruction time.
>> What is real world code? LAMP alone?
> Code doing non-trivial things. To be honest, I am pretty frustrated that 
> we have to belabor this. To indulge you, what seems really rather 
> obvious to me is that if you have code where a CONSTANT 30 mu s per 
> process matter, then it must be something like the following (in 
> whatever shell or language):
> for (1..100000) {
>   invoke_perl_process("-e", "s/a/b/")
> }
> Now, that means a 3s slowdown! But the matter of fact is that this could 
> is DOING IT WRONG already. Spawning a new process for something that 
> trivial is absolutely, irrevocably, and indubitably the wrong thing to 
> do. Process creating is quite expensive, so is Perl startup. 
> Particularly on Windows, so you should be aware. If performance matters, 
> that code needs to be changed ANYWAY.

User interactive proprietary software with an locked down api 
interpreted language extendability interface that calls Perl one liners 
which calls a proprietary console tool that does something to the 1st 
piece of software on Windows. Its a very common mouse click to the user, 
but nobody can click a mouse 100000 times a day. I can't describe 
anything more. The response time will probably never be less than a 
second or 2 by my guess (button lift to hour glass off). If a 100 
optimizations are removed (intentionally or accidentally) without 
benchmarking over some years from perl, nobody will ever notice the 
extra ms per run building up.

> Not just that, you realize that this is NOT just removing ++/--, right? 
> Did you look at the patch?

I did look at it. sv_clean_objs(); will run unconditionally.

"++/-- code" refers to the concept of keeping count of the blessed 
objects, not the inc or dec instruction alone.

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