Skip to content

Speed up filtering - #126

Merged
alexhroom merged 9 commits into
mainfrom
119-faster-filters
May 21, 2026
Merged

alexhroom merged 9 commits into
mainfrom
119-faster-filters

Conversation

@alexhroom

@alexhroom alexhroom commented May 15, 2026 •

Copy link
Copy Markdown
Collaborator

This PR fixes #119 by changing the filtering. Instead of reducing the size of the arrays to the filtered values, the whole arrays are now passed to the histogram code and the filtered-out values are given a weight of zero instead.

@alexhroom
alexhroom force-pushed the 119-faster-filters branch from 6fe31a7 to cd02853 Compare May 15, 2026 11:21
Comment thread src/MuonDataLib/cython_ext/filter.pyx Resolved
@alexhroom
alexhroom force-pushed the 119-faster-filters branch from 072e80b to 815f339 Compare May 19, 2026 10:14
@alexhroom
alexhroom marked this pull request as ready for review May 19, 2026 10:29
Comment thread src/MuonDataLib/cython_ext/stats.pyx Resolved
@alexhroom
alexhroom force-pushed the 119-faster-filters branch from b53c409 to 815f339 Compare May 19, 2026 10:44
@AnthonyLim23

AnthonyLim23 commented May 20, 2026 •

Copy link
Copy Markdown
Collaborator

I have found a bug, but Im not sure where its coming from. If I use the GUI to load some data and press calculate, it doesn't matter if there is a filter or not I will always get the same result.

Just checked main seems to be fine

@AnthonyLim23 AnthonyLim23 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I cant reproduce the bug, so I assume its a mistake on my part. This is a significant improvement to the performance of the code.

@alexhroom
alexhroom merged commit 22691c1 into main May 21, 2026
15 checks passed
@alexhroom
alexhroom deleted the 119-faster-filters branch May 21, 2026 09:59
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.

speed up filters

2 participants