Dave Gray wrote:

On 5/23/05, Peter Rabbitson <[EMAIL PROTECTED]> wrote:
On Mon, May 23, 2005 at 01:40:08PM -0400, Zhenhai Duan wrote:
I tried hash (where the members of a group are joined with ":"), and hash
of hash. It happended that hash of hash is slower than single hash.

Hash:
$groups{$g1} = "$member1:$member2";

Hash of hash
$groups{$g1}{$member1} = 1;

Method 1 is faster, even I need to do a split to get the members.
Can you post some code? Without it the above statement is not very credible
to say the least.

The 1D approach seems to be approximately 3 times as fast (on x86
Linux). Anyone get different results?
FreeBSD 6.x-current w/ perl5.9.3 and ithreads.

[ttyp0] [EMAIL PROTECTED] /usr/home/pgollucci rv=0 26 >perl test.pl
generating hashes..........!
               base  0.02  0.00   0.02
                 1D  0.14  0.00   0.14



--
END ---------------------------------------------------------
   What doesn't kill us, can only make us stronger.
              Nothing is impossible.
                                
Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to