Just a couple nodes back you asserted that NOT using the vars "isn't an option;" Then you conceed that you "didn't mean to say that there are no technical alternatives" Now you're offering justification by way of a hypothetical case in which one might "load a module that contains those variables."
- That suggests you'd better take a look at what's in the module that you might load (and, IMO, any module that uses those needs to be scrutinized very carefully for {other} sub-optimal techniques).
- Some -- very possibly most -- of the "performance impact is triggered by the mere presence of those variables" but you haven't allocated any of it to the difference between calling a no-op sub (all commented) and a sub with as much as a single operation (one, uncommented). Again, profile it.
- You are correct, of course, that some..most of the impact is from declaration, but, as noted by numerous respondents, that's well documented. Learning facts like that is part of the reason for reading the docs.
UPDATE: Inserted dropped negation, para 1, sentence 1.
| [reply] |
Yes, having those variables not seen at compile time isn't an option, for the reason I already gave. My code is but one piece of a bigger project for which I have no control over what modules get loaded or what their content is. I'll admit to a lack of details on my situation but not of consistency in my answers...
Again, profile it.
Always a good advice. Profiling with NYTProf prior to my original post is how I detected the source of my issue.
Learning facts like that is part of the reason for reading the docs
Another great piece of advice. I quote perlvar myself in my post so I think I pass :)
| [reply] |