Kemsekov / GraphSharp

GraphSharp is a tool to study and use knowledge of graph theory in C#!
MIT License
37 stars 5 forks source link

`INode.Edges` cast in `INode{}` implementation is slow! #34

Closed Kemsekov closed 2 years ago

Kemsekov commented 2 years ago

This part is really slow

        IEnumerable<IEdge> INode.Edges => this.Edges.Select(n=>n as IEdge);

It will do Select for each edge any time you will try to access Edges property. Because if this current version of library is 3x slower than previous one. Fix it

Kemsekov commented 2 years ago

I fixed it but I had to add extra abstraction level and It is still not perfect solution, so I will rename issue