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

Cache sampling of medoid #263

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Cache sampling of medoid #263

merged 1 commit into from
Jun 26, 2024

Conversation

jakobnissen
Copy link
Member

This commit adds a cache to the sampling of the medoid in clustering. This allows the clusterer to fetch the results from a dict, if it's been previously computed. This will get merged only if benchmarks have verified that clustering actually runs faster - it's probable that so few medoids are sampled multiple times that the cache wastes more time in overhead than it saves in computation.

@jakobnissen jakobnissen added the Needs benchmark Must benchmark before merging this label Nov 12, 2023
This commit adds a cache to the sampling of the medoid in clustering. This allows
the clusterer to fetch the results from a dict, if it's been previously computed.
This will get merged only if benchmarks have verified that clustering actually
runs faster - it's probable that so few medoids are sampled multiple times that
the cache wastes more time in overhead than it saves in computation.
@jakobnissen
Copy link
Member Author

Wow, this is much faster, and consumes little extra memory.
May be different for very large runs with millions of contigs but for now let's take the win.

@jakobnissen jakobnissen merged commit d35788c into master Jun 26, 2024
5 checks passed
@jakobnissen jakobnissen removed the Needs benchmark Must benchmark before merging this label Jun 26, 2024
@jakobnissen jakobnissen deleted the sample_cache branch June 26, 2024 07:39
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.

1 participant