Performance improvement for equality checking
See original GitHub issueThe __eq__
function in the DFA class uses the symmetric difference between both DFAs, which is an O(n^2) time algorithm (and requires creating an auxiliary DFA). The Hopcroft-Karp algorithm doesn’t require creating the auxiliary data structures, but requires the use of a union find. I think it’s possible to copy in the code from a generic Python Union-Find, but the networkx
package has an implementation. Is it too much to introduce this dependency? Any generic union find should work.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Improving the performance of equality or comparison evaluation
Hashing expressions can improve performance at equality-test stage. Test evaluations that involve variables from two different rule conditions can be time ...
Read more >How right equals() method could improve the performance of ...
First “if” section checks if objects link on the same object in the string pool(This is why I during generating set Student city...
Read more >Equality Check product tour
Performance overview in reporting dashboard for each data category in Equality Check. Identify areas for improvement. To understand what your data suggests in ......
Read more >Performance Improvement and Corrective Action
The primary goal of corrective action is to facilitate performance and behavior improvement, rather than to serve as a punitive action.
Read more >Is the inequality operator faster than the equality operator?
First, you do a CMP (comparison) operation. You then do a check to see if the comparison is equal, not equal, etc. This...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing since PRs for equality function and networkx dependency have been merged.
@eliotwrobson A bunch of other functions? I like the sound of that.
Very well, then! I approve the addition of
networkx
as a dependency. Just please remember that when you submit your next PR to add the dependency, you’ll need to addnetworkx
to thedependencies
array inpyproject.toml
(with whatever version constraint you deem appropriate).Thanks again!