Skip to content

Conversation

@shimpe
Copy link

@shimpe shimpe commented Jul 15, 2019

the current implementation uses an algorithm with O(n^2) time complexity which is very expensive in case of many points; the proposed implementation is O(n).

To give an idea: the current algorithm on a list of 10000 integers between 0 and 5000 takes around 8.7 seconds on my pc, whereas the new routine takes around 0.002 seconds (the new routine doesn't keep the original ordering of points but as far as I can tell it's not needed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant