Skip to content

Optimised clone list creation#1

Open
TobiasWrigstad wants to merge 3 commits intomasterfrom
optimisation
Open

Optimised clone list creation#1
TobiasWrigstad wants to merge 3 commits intomasterfrom
optimisation

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

Comments