in reply to Benchmark of hash emptiness test
I wouldn't view that example from the perlfunc man page as "advice", but simply as an explanatory example. It's just telling you what it means for a %hash variable to be "defined" vs. "not defined"; it's there to clarify the relationship between "having keys" and "being defined", as this applies to hashes. (update: I should have looked more closely first -- yes, the phrasing does make it look like it's intended to be "advice", but if you can find a better way, that's great! Thanks for telling us about it.)
Use whatever idiom works best for your app. That's what benchmarking is all about.
|
|---|