[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] array->hash (was: Love & Hate shenanigans)



On Thu, Mar 29, 2001 at 02:49:21PM +0200, Sven Neuhaus wrote:
> 
> Also interesting: Converting the large array to a hash is very slow with
> map and fast with foreach:

According to my benchmark (attached), it's slightly quicker to do

  @Array{@Array} = (1)x@Array;

which is a beautiful trick :-)

 .robin.

-- 
"Have you been certain you came to me the real reason explain anything
else that I came to you the real reason explain anything else that I
came to you the real reason explain anything else?" --eliza

arrhash.pl