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

Use of global vs interpreter variables

Thread Next
From:
Karl Williamson
Date:
July 26, 2016 20:56
Subject:
Use of global vs interpreter variables
Message ID:
9afca162-6d4d-1e50-bcad-3d112d79499a@khwilliamson.com
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


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