Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Re: Re: Bingo Challenge

by Matts (Deacon)
on May 20, 2002 at 06:47 UTC ( #167778=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Bingo Challenge
in thread Bingo Challenge

Have you benchmarked that to see if it's faster?

My suspicion would be that for large data sets it would be, but for smaller ones my naive rand() implementation would be quickest.

Replies are listed 'Best First'.
Re: Bingo Challenge
by CharlesClarkson (Curate) on May 20, 2002 at 11:16 UTC
    Have you benchmarked that to see if it's faster?

    No, I used logic. (which is why I said it could be faster.) A shuffling algorithm takes the same time to shuffle on each pass. It's really just randomizing the array indexes. The idiom you were using varies each time through. The less words left, the longer it will take to produce an unchosen word. My thought was, perhaps you were unaware of shuffling or its application here.

    Charles K. Clarkson
    Clarkson Energy Homes, Inc.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://167778]
and the daffodils sway...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-09-22 07:14 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (259 votes). Check out past polls.