develooper Front page | perl.perl5.porters | Postings from July 2016

Use of global vs interpreter variables

Thread Next
Karl Williamson
July 26, 2016 20:56
Use of global vs interpreter variables
Message ID:
When I started out, someone told me a goal was to keep the number of 
global variables to a minimum.  Is that so? and if so, why?

The only reason I can think of is to minimize page faults from the OS, 
but that seems to be outweighed by the expense of copying interpreter 
level data upon each thread start-up.

For example, PL_sv_yes needn't be per-interpreter AFAICT, nor the 
definitions of things like \w.

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