Skip to content

Make annotate faster by using indexing instead of merge#353

Merged
nvictus merged 12 commits intomasterfrom
faster-annotate
Oct 25, 2023
Merged

Make annotate faster by using indexing instead of merge#353
nvictus merged 12 commits intomasterfrom
faster-annotate

Conversation

@Phlya
Copy link
Copy Markdown
Member

@Phlya Phlya commented Oct 24, 2023

Changed the annotate function to use indexing and concatenation instead of df.merge(). Makes it about 2x faster.

@Phlya Phlya requested a review from nvictus October 24, 2023 14:37
@Phlya
Copy link
Copy Markdown
Member Author

Phlya commented Oct 24, 2023

Thank you to whoever wrote the tests, they caught a bug, now fixed. @nvictus I had to add .copy() for the bins, otherwise they were getting modified twice and were getting weird column names... guess this would create extra copies of the bintable in memory? Maybe that's not ideal... thoughts?

@nvictus
Copy link
Copy Markdown
Member

nvictus commented Oct 25, 2023

@Phlya did some refactoring including some int casting to prevent a regression of #284

@nvictus nvictus merged commit cb529bc into master Oct 25, 2023
@manzt manzt deleted the faster-annotate branch January 27, 2024 03:08
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