Post Reply 
Programming puzzles: processing lists!
06-06-2017, 04:36 PM
Post: #132
RE: Programming puzzles: processing lists!
(06-06-2017 03:47 PM)pier4r Wrote:  Thanks! And the fisher Yates shuffle was already mentioned here: http://www.hpmuseum.org/forum/thread-795...l#pid71847

I did not recognize that in you code (that looks very similar to mine, but I was wondering whether I applied enough shuffles)

edit: RANL appears to be quite weak.

I'm pretty sure that post is where I saw Fisher-Yates referenced the first time. Thanks for pointing it out.

Re: RANL, I presume you could achieve better results by calling it repeatedly on a list, but at that point you'd be wasting a lot of time for a few bytes savings. I believe the Fisher-Yates method is sufficient in a single invocation, or should be so long as RAND is adequate.

Revisiting this has reminded me that I wanted to test whether I could use the Inside-out method to speed up LSHF by building the shuffled list an element at a time instead of exploding it first. I'm cautiously optimistic about that given the positive results I've seen with some other functions.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming puzzles: processing lists! - DavidM - 06-06-2017 04:36 PM



User(s) browsing this thread: 1 Guest(s)