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

Re: Extra Scalar member of GVs for methods

Thread Previous
From:
Nick Ing-Simmons
Date:
December 20, 1999 09:00
Subject:
Re: Extra Scalar member of GVs for methods
Message ID:
199912201700.RAA20951@tiuk.ti.com
Larry Wall <larry@wall.org> 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 <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About