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

Optimised clone list creation #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

TobiasWrigstad
Copy link
Member

This PR optimises the clone list creation by using maps and sets. Instead of maintaining a list of lists, we maintain a hashmap mapping SCCSnippetIDs to sets of SCCSnippetIDs. This allows O(1) lookup of ids instead of scanning all lists. All SCCSnippetIDs that are considered clones map to the same set of IDs. This is achieved by merging sets of ids when linked by a clone pair.

Preliminary results suggest a factor 100 speed-up for this particular method. I don't know how it will affect the overall run-time of the program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants