-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Performance improvements for epsilon removal and determinisation #441
Merged
katef
merged 12 commits into
main
from
sv/performance-improvements-for-epsilon-removal-and-determinisation
Sep 11, 2023
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
039219a
state_set: Improve `state_set_search` performance, correct result.
silentbicycle 4bb505d
stateset: Avoid memmove of size 0.
silentbicycle 0e4d46a
stateset: Add note about potentially expensive assertion.
silentbicycle 351cea0
stateset: Comment struct fields.
silentbicycle be9bd88
edgeset: Fix indentation for `#if`'d block.
silentbicycle 7a47e2a
edgeset: Switch from linear to binary searching in edge_set_add_bulk.
silentbicycle bca2488
edgeset: Commit to using binary search.
silentbicycle bd5398d
determinise: Drastically reduce calls to qsort.
silentbicycle 70dc1b3
edgeset: Remove stale comment.
silentbicycle ae7c5b7
UBSan: Avoid implicit signed/unsigned conversion.
silentbicycle f623b5e
UBSan: Avoid implicit signed/unsigned conversion.
silentbicycle a58cab2
bugfix: The range is min..max inclusive, so add 1.
silentbicycle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we use this in
edge_set_find
andedge_set_contains
too?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.
We can binary search here because the
struct edge_group
array is sorted by.to
and we're searching by destination state, butedge_set_find
andedge_set_contains
are searching by edge label. If they were frequently searched and it became a hotspot in the profile we could do linear-time reindexing and bsearch on those, but currently they don't even show up in the profile. As far as I can tell they're only even called from insidefsm_walk2
and the minimisation test oracle.