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

Compute average distance matrices more efficiently #454

Merged
merged 2 commits into from
Apr 21, 2024

Conversation

davidcerny
Copy link
Contributor

Apologies for implementing all of this in a piecemeal manner, but I just noticed the same trick I'd used in PR #432 to make ExponentialError::lnPdf more performant can also be exploited in TreeUtilities::getAverageDistanceMatrix. (In contrast, the even faster std::sort-based solution eventually implemented in PR #434 wouldn't work here, because we are working with string vectors of different lengths.) It results in an approximately 16-fold speed-up when computing 10,000-by-10,000 average distance matrices.

Copy link
Member

@hoehna hoehna left a comment

Choose a reason for hiding this comment

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

looks good

@hoehna hoehna merged commit 7c2b560 into development Apr 21, 2024
20 checks passed
@hoehna hoehna deleted the avgdistmat-efficiencies branch April 21, 2024 09:49
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.

None yet

2 participants