Post Reply 
Programming puzzles: processing lists!
04-25-2017, 01:31 PM (This post was last modified: 04-25-2017 01:32 PM by Claudio L..)
Post: #36
RE: Programming puzzles: processing lists!
(04-25-2017 03:01 AM)DavidM Wrote:  A typical run gave these results on my 50g (approx. mode):
MAP: 1.0255
DOLIST: 0.4794
DOSUBS: 0.4556

Interesting. For completeness, I tested also just doing {...} << \v/ >> TEVAL and got 0.4485 seconds.
So it's fair to say the overhead of using DOLIST or DOSUBS versus just applying the function to the list seems to be negligible (< 10 ms, probably uses some internal version of DOLIST).
MAP on the other hand is introducing a significant delay.

I also tested newRPL on this and there's a negligible difference between DOSUBS, DOLIST and MAP. Actually MAP seems slightly faster (< 20 ms with my calc locked to 6 MHz due to low battery). In fact, in newRPL doing MAP is even faster than applying the square root to the list directly (because it uses MAP internally, so it's MAP+overhead) but the difference in all cases is very small so as to be negligible.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming puzzles: processing lists! - Claudio L. - 04-25-2017 01:31 PM



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