Programming puzzles: processing lists!
|
06-13-2017, 08:23 AM
Post: #147
|
|||
|
|||
RE: Programming puzzles: processing lists!
(06-13-2017 12:43 AM)DavidM Wrote: I ran a single cycle with 1000 list elements, and got these results: You saved me. The night is passed but the 50g is still working. Based on your measurements I would expect 13.5 hours for 10 cycles. Impressive how headList dropped his efficiency and started to be not linear (so exploding a list does not help too) and impressive for + get. I remember now I tested it with 1000 elements and I was getting like 35 seconds. Even for it is not linear (one would expect 9 seconds, 10 times 0.9, not 35) but still only "5" times slower than the DOx commands. Also tail+head very quick. Quote:The LROT loop is most likely a victim of multiple garbage collection events, as the expected time based on previous timings would have been closer to 385 seconds. Yes I guess special cases of an "handful" of elements rotated (I do not know a meaningful threshold, but maybe up to +10 , -10 ?) would make LROT really effective even for multiple calls. Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)