Skip to content

Conversation

@ferranpujolcamins
Copy link
Collaborator

In this PR I've added performance tests for the path and cycle constructors. This constructors were performing subpar.
I've improved the performance to bring it to the same level as the star graph constructor for UnweightedGraph.
For UniqueElementsGraph, I've improved the performance by 34% in the general case and by 66% when vertices are Hashable. This is possible through specialized class extensions. But in order to do so easily, UniqueElementsGraph is no longer a subclass of UnweightedGraph, which actually makes sense to me since Graph is now a protocol.

@davecom davecom merged commit 2a7f77d into davecom:master Oct 19, 2018
@davecom
Copy link
Owner

davecom commented Oct 19, 2018

Nice stuff

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.

2 participants