Post Reply 
Programming puzzles: processing lists!
06-16-2017, 04:23 AM
Post: #164
RE: Programming puzzles: processing lists!
(06-15-2017 11:01 PM)pier4r Wrote:  In other words how does it compare against for + get to iterate over a list?

I did a short run (1 iteration) of several of the tests, with the newest commands added in:

"for get" { 43.1793 }
"start tail head" { 42.0251 }
"start lrot" { 122.0122 }
"start LHDTL" { 29.552 }
"start LRLLD" { 120.5847 }

So LRLLD is slightly faster than the updated LROT. Not anywhere near as fast as the FOR/GET loop, but you have to remember that it's actually doing more than simply getting 1 list element. It literally moves all 1000 of the list elements every time through the loop. So I don't feel too bad about the performance.

I also tested the new command LHDTL, which performed nicely. Not as fast as DOLIST or DOSUBS, but better than FOR/GET and DUP TAIL SWAP HEAD.
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-16-2017 04:23 AM

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