List Commands Library for 50g
|
03-17-2018, 03:12 PM
Post: #284
|
|||
|
|||
RE: List Commands Library for 50g
(03-17-2018 10:14 AM)pier4r Wrote: presuming LSHUF working as well as RAND. I am testing this indeed. One thing to keep in mind about your method: Calling LSHUF to randomize a list just to get the HEAD entry will always be much slower than using <list> DUP SIZE RAND * IP 1 + GET. In the former case, you are essentially exploding the list, calling RAND for every list element and then swapping positions, then rebuilding the entire list only to then extract the first entry. In the latter, you are only determining a random pick once and extracting it. Much less work to do for that one, so it will be much faster. A quick test on even a small list (4 elements) shows the 'LSHUF' method takes about .057s whereas the 'RAND' method only takes .021s. The LSHUF method will get even worse as list sizes grow. As it appears that you are running long loops of these types of tests, performance of the algorithm is important to consider. Another consideration: could some of these initial tests be performed on a 50g emulator? It appears that there's a need to "test the test" first, and you might be able to validate your test method with a smaller sample size with much faster results on an emulated 50g than doing the full-sample-set test on the real hardware. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)