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 query list generation for dense matching #453

Merged
merged 2 commits into from
Mar 24, 2025
Merged

Conversation

mihaidusmanu
Copy link
Contributor

@mihaidusmanu mihaidusmanu commented Jan 25, 2025

Python does not seem to be a fan of summing tuples > Python 3.9 was stuck on this line for several minutes on a large dataset before I killed it.

Probably related to https://stackoverflow.com/questions/41032630/why-is-pythons-built-in-sum-function-slow-when-used-to-flatten-a-list-of-lists

Switching to set(chain.from_iterable) made it ~instant.

@mihaidusmanu mihaidusmanu requested a review from Phil26AT January 25, 2025 13:24
@mihaidusmanu mihaidusmanu requested a review from sarlinpe March 23, 2025 09:16
Copy link
Member

@sarlinpe sarlinpe left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@sarlinpe sarlinpe merged commit e334220 into master Mar 24, 2025
1 check passed
@sarlinpe sarlinpe deleted the mihai/pairs-dense branch March 24, 2025 20:40
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