in reply to Re^5: What is the most efficient way to see if a hash is empty?
in thread What is the most efficient way to see if a hash is empty?
I got that because the more elements the bigger the difference in performance of empty and full hashes. If all we were doing was checking a member of a structure, why would there be any difference at all related to size? Wouldn't the difference between empty and full be simply the difference between one and two pointer de-references - one to get the allocated bucket count and one to get the used bucket count? I should think that would be at most 200%, not 400% and up. And that's assuming that the code involved in dying consumed only a fraction of the time consumed by fetching one or two variables.
Best, beth
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: What is the most efficient way to see if a hash is empty?
by BrowserUk (Patriarch) on Apr 28, 2009 at 12:23 UTC |