Skip to content

implement 2d prefix sums [SATs] for faster algorithmic implementation of epsilon#10

Open
jlotthammer wants to merge 1 commit intomainfrom
cython_optimizations
Open

implement 2d prefix sums [SATs] for faster algorithmic implementation of epsilon#10
jlotthammer wants to merge 1 commit intomainfrom
cython_optimizations

Conversation

@jlotthammer
Copy link
Copy Markdown
Contributor

Description

This PR attempts to reduce the time complexity of the windowing computation used in the epsilon calculation dramatically by leveraging a summed-area table datastructure to make the window computations constant time after an initial O(m*n) preprocessing stop. For large window sizes - e.g., our default w=31, this results in a ~60-70x speedup.

Todos

Notable points that this PR has either accomplished or will accomplish.

  • The finches package lacks good test coverage of the codebase. So it is difficult to make sure there are no regressions here. My implementation passes the one functionally available test, and algebraically I think I didn't screw anything up. Additionally, I compared the two algorithms on random data - which can be found at becnhmarking/ directory and they are consistent. I think based on all these lines of evidence that it is correct, but I'll have more confidence when things are cleaned up in this codebase and tests are written.

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