develooper Front page | perl.perl5.porters | Postings from December 1999

Re: Extra Scalar member of GVs for methods

Thread Previous
Nick Ing-Simmons
December 20, 1999 09:00
Re: Extra Scalar member of GVs for methods
Message ID:
Larry Wall <> writes:
>Nick Ing-Simmons writes:
>: This was presumably to avoid the extra 
>: test so that GvSV was quicker than GvAVn - but this is of less value
>: now that "most" scalar vars are presumed to be lexical.
>Yes, I want lexicals faster than globals, but you guys keep coming up
>with ways of slowing down globals instead of speeding up lexicals.  :-)

I am speeding up lexicals by not filling the cache lines with a bunch of
SVs which are never referenced ;-)

Attached is a toy module.

Used like this : 

perl -MGVTax -e ''
48 GVs of which 8 (16.6667%) are defined

or a partly exercised Tk demo: 

perl -MGVTax basic_demo 
2807 GVs of which 110 (3.91877%) are defined

I am not about to argue that 3000 SVs is going to amount to much,
so if that is whole scope of the problem I will shut up again.

Nick Ing-Simmons <>
Via, but not speaking for: Texas Instruments Ltd.

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