Post Reply 
(49g 50g) Shoelace algorithm
08-27-2018, 05:20 PM
Post: #19
RE: (49g 50g) Shoelace algorithm
John, thanks again for measuring the timings of these different implementations.

One of the reason for the difference could be that my solution uses two lists xs and ys while your solution uses a single list with the xs and ys interleaved. Thus you're forced to loop over twice the length of the list and throw half of them out.

That's when a 2nd parameter step for DOSUBS would be handy that controls how many elements to advance with each pass. In this case we would use step = 2.

And then I have no idea how DOSUBS behaves compared to ∑LIST and the other list operations ADD, and *.

I've optimised the input data-structure for the implementation of the algorithm. So it feels a bit like cheating.

Best regards
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(49g 50g) Shoelace algorithm - John Keith - 08-23-2018, 02:20 PM
RE: (49g 50g) Shoelace algorithm - Thomas Klemm - 08-27-2018 05:20 PM



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