in reply to Re^2: Comparing two hashes for duplicate keys with no case sensitivity
in thread Comparing two hashes for duplicate keys with no case sensitivity

Hm ... where is the second loop you're seeing, chromatic? Is the join operator an undercover loop as well? Clearly, if the complexity of the join operation is equivalent to that of a regular for loop we don't gain much.

Cheers -

Pat

Replies are listed 'Best First'.
Re^4: Comparing two hashes for duplicate keys with no case sensitivity
by chromatic (Archbishop) on Aug 15, 2008 at 17:08 UTC

    Yes, join is O(n) where n in this code is the number of keys in the hash. Perl's implementation is slightly more efficient for join than Perl-side iteration, but that's why there's a join operator.