(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 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)