-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
py3: replacing some .vertices() by .vertex_iterator() #25832
Comments
This comment has been minimized.
This comment has been minimized.
Branch: u/chapoton/25832 |
Commit: |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Changed author from frederic chapoton to Frédéric Chapoton |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:5
Needs review? |
comment:6
Replying to @tscrim:
I guess no, this fails several tests. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
There remains failing doctests in species. Probably we can just change the doctests. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:11
I have undone the change in species, that was making some doctests return random results. |
comment:12
Perhaps the thing to do would be to run |
comment:13
Hmm, what do you mean ? Using "sorted" in species ? |
comment:14
Yes, that is correct. |
comment:15
Well, ideally we would write doctests that do not depend on the output order, but sometimes that is harder than its worth. |
comment:16
oh, well. Maybe we can just keep that for another ticket, no ? |
comment:18
A few comments in
could be changed to
Indeed, the cost of |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:20
To avoid converting
|
comment:22
I am not sure of what is exactly the point of converting to set. I can see that it can handle bad input, namely duplicate elements in the given frozen list, in which case we do not want to use the bad input itself. But you seem to say that by itself it will be faster in the loop ? Is this just by being a set instead of a list ? |
comment:23
Testing if an element is in a list takes time
I agree it's a minor improvement compared to other modifications. |
comment:24
In the quiver.py file, we are mostly dealing with digraphs with a small number of vertices. Probably almost never above 50. So these 'optimizations" are not really useful, I think. |
comment:25
I agree that it's not really useful, but as you have to convert frozen to set, you just have to do:
|
comment:27
ok, done. Thanks |
Reviewer: David Coudert |
comment:28
LGTM |
Changed branch from u/chapoton/25832 to |
mainly inside loops.
Inspired by ##22349
Found using
CC: @tscrim @jm58660 @dcoudert
Component: combinatorics
Author: Frédéric Chapoton
Branch/Commit:
03972bf
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/25832
The text was updated successfully, but these errors were encountered: