question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance improvement for equality checking

See original GitHub issue

The __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:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
eliotwrobsoncommented, Aug 18, 2022

Closing since PRs for equality function and networkx dependency have been merged.

1reaction
caleb531commented, Aug 17, 2022

@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 add networkx to the dependencies array in pyproject.toml (with whatever version constraint you deem appropriate).

Thanks again!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found