in reply to Re^3: Effeciency of key-only hash
in thread Effecicncy of key-only hash

Any of those executes at well over 300000 per second. How many seconds do you think you'll spend debugging a "failure to use exists"? Is the performance gain worth that? How many times would you have to run this program before the execution time gained exceeds the debugging time lost? How do you value your time versus execution time (note that you're coding in Perl, not C)?

Replies are listed 'Best First'.
Re^5: Effeciency of key-only hash
by massa (Hermit) on Aug 24, 2008 at 19:34 UTC
    ++
    You have a wonderful point there.
    In my mind, personally, I associate sets with hashes of undef, so I get to see easily if an exists is missing, but I can see others letting it go.
    []s, HTH, Massa (κς,πμ,πλ)