ansasaki / abimap

A helper for library maintainers to use symbol versioning
MIT License
7 stars 1 forks source link

high algorithmic complexity in Release.duplicates() #47

Closed tomato42 closed 6 years ago

tomato42 commented 6 years ago

https://github.com/ansasaki/smap/blob/608f590b98a1ad2e12c078974eafeef8f4aa58fa/src/smap/symver.py#L810-L823

searching in arrays has complexity of O(n), both seen and release_dups could be sets here, as searching them has complexity of O(log n)

arranging for symbols to not be Null would also allow us to remove the if symbols: check