http://qs1969.pair.com?node_id=11134882


in reply to Re^7: Using 'keys' on a list
in thread Using 'keys' on a list

Yes, good point.

For context, the code I'm feeding through B::Concise is a very simplified version of the original benchmark code (see 11134740 and 11134741). That code allocates very large hashes.

The interesting point is that returning a huge list of keys, in list context, is faster than returning a reference to a hash followed by calling keys on a hash dereference. Ordinarily one would expect the latter to be faster than the former.