-
Notifications
You must be signed in to change notification settings - Fork 54
Speed up OnDigraphs
for a digraph and a permutation
#267
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Speed up OnDigraphs
for a digraph and a permutation
#267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing this @ChrisJefferson. I made a couple of comments - I'll give @james-d-mitchell a chance to say what he thinks, and see how attached he is to the error message.
Another solution is that we could create some |
@ChrisJefferson I know this is a bit late (sorry) but I intend to come up with a resolution for this soon that keeps the performance improvement. |
OnDigraphs
for a digraph and a permutation
2b23a40
to
473853b
Compare
I'd propose improving the performance of |
* Instead of checking if the permutation fixes the vertices, check if it is the identity (which is much cheaper, although catches less cases) * Do not check explictly if the permutation maps the vertices of the graph to itself, do the mapping then check afterwards.
473853b
to
7d9797d
Compare
I tried my best to incorporate the improved methods, but I just do not see the timing improvements claimed. I settled on implementing a separate
There seem to be some minor improvement (within margin of error in some cases) with the proposed |
Thanks @reiniscirpons looks good |
This came up from some code which was heavily using digraphs. this almost doubled the speed of the algorithm, as it turns out these GAP-level checks were dominating the run-time of OnDigraphs.
Instead of checking if the permutation fixes the vertices, check
if it is the identity (which is much cheaper, although catches
less cases)
Do not check explictly if the permutation maps the vertices
of the graph to itself, do the mapping then check afterwards.