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 numerai_corr x 2 #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TobiasKonradsen
Copy link

@TobiasKonradsen TobiasKonradsen commented Sep 21, 2024

This PR introduces a benchmark for the power function and numerai_corr, running each function 1000 times to measure performance. Additionally, a significant speedup was achieved by optimizing a slow assertion in the power function, and replacing the power function with a more efficient numpy based implementation.

The results of the speedup are:

Master:
Execution time power_bench: 3.6272 seconds
Execution time numerai_corr_bench: 10.5109 seconds

This branch:
Execution time power_bench: 0.7179 seconds
Execution time numerai_corr_bench: 4.9527 seconds

To run the benchmark do:
python -m tests.test_scoring
Additionally, it can be run with --profile argument to do profiling of the functions.

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