develooper Front page | perl.beginners | Postings from April 2002

Re: Scripts picks random elements from array , but it repeats som etimes

Thread Previous | Thread Next
From:
drieux
Date:
April 29, 2002 16:57
Subject:
Re: Scripts picks random elements from array , but it repeats som etimes
Message ID:
BC3B85A6-5BCC-11D6-8162-0030654D3CAE@wetware.com

On Monday, April 29, 2002, at 02:03 , Bob Showalter wrote:
[..]
http://www.wetware.com/drieux/CS/lang/Perl/Beginners/BenchMarks/randTest.txt

has been updated to take in more data...

>
> splice() will be slower as the size of the array grows. If I take
> your benchmark and change to array from 1..100 to 1..10000, I get
> the following results for 100 iterations (on an old Pentium 266):

WOW! talk about size matters....

some of the gambits work better at a given size than others.

I think the decLoop trick because of it's overall reasonable
performance across the spectrum seems to clearly have merit.

I need to find a more effective way to show the strength's
of felix's fisher_yates_shuffle from the perldoc's since
I rather doubt that I would use it quite the way that I
tested it - and saw no real significance from 'inlining'
the code....


ciao
drieux

---


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About