You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current implementation, a C integer array is created which is iterated to check membership. This is done to save memory because otherwise a hash table as implemented would have to be created for what is likely a very small set of unchanging edges. If the CPython API is fast enough, this could be an easy way to check membership in the static set.
The text was updated successfully, but these errors were encountered:
While it would be faster than O(n) lookup, n is the number of excluded edges here. To use the CPython API, a new Python tuple object would have to be created for every new edge. Since few excluded (if any) will be present in most cases, iterating over the excluded edges should be faster.
https://docs.python.org/3/c-api/set.html#c.PySet_Contains
In the current implementation, a C integer array is created which is iterated to check membership. This is done to save memory because otherwise a hash table as implemented would have to be created for what is likely a very small set of unchanging edges. If the CPython API is fast enough, this could be an easy way to check membership in the static set.
The text was updated successfully, but these errors were encountered: