Skip to content
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

Speed up PositionSublist by using Position to search for first entry #4599

Merged
merged 2 commits into from
Jul 6, 2021

Conversation

hulpke
Copy link
Contributor

@hulpke hulpke commented Jul 5, 2021

instead of linear search in the library. This is much faster when there is little self-overlap.
This is used in some of the routines working with presentations and gives a significant speedup.

Ultimately, this should become a kernel function.

entry, instead of linear search in the library. This is much faster when there
is little self-overlap.

Ultimately, this should become a kernel function.
@hulpke hulpke added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements priority: high labels Jul 5, 2021
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

I took the liberty of pushing another commit to this PR which refactors it a bit, to reduce diffs (when hiding whitespace diffs) to the previous version of the code (and some negligible performance gains -- like, for loops over ranges are a bit faster than while loops).

@hulpke hulpke merged commit 2924e9f into gap-system:master Jul 6, 2021
@fingolfin fingolfin changed the title ENHANCE: PositionSublist uses Position to search for first entry Speed up PositionSublist by using Position to search for first entry Aug 17, 2022
@fingolfin fingolfin added topic: performance bugs or enhancements related to performance (improvements or regressions) release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements priority: high release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: performance bugs or enhancements related to performance (improvements or regressions)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants