Post Reply 
Programming puzzles: processing lists!
06-13-2017, 10:06 AM (This post was last modified: 06-13-2017 11:49 AM by pier4r.)
Post: #148
RE: Programming puzzles: processing lists!
In the meanwhile my 50g finished. Those are the results for 10 iterations over lists of 1000 elements (the same as the one from David, just to confirm the results. Wait not, there is one that does not fit)
"dosubs" avg { 7.85 }
"dolist" avg { 7.76 }
"for get" avg { 34.08 }
"start geti" avg { 54.86 }
wrong: "start headList" avg { 4.12 } (instead of 535 s. What's going on here? Surely replicating the test in different setups helps)
"start headList" avg { likely 535 as David tested } I found a bug and I checked the code for a list of 100 elements, it returns 1.66s on average (I corrected the older post). So likely it uses 530 seconds or more on 1000 elements. I do not have the time, at the moment, to let it run.
"start tail head" avg { 33.38 }
"start lrot" avg { 4867.04 }


I'll have to double check the headList result because it seems to good to be true. Moreover david reports 535 seconds, mine 4 seconds.

Edit: checked, indeed there was a bug.

Anyway, all in all, the for + get is quite feasible as subsitute for nested iterations of dolist/dosubs

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming puzzles: processing lists! - pier4r - 06-13-2017 10:06 AM



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