Skip to content

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