-
Notifications
You must be signed in to change notification settings - Fork 58
perf: Use 4x faster decimal conversion method across all indicators #439
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: DaveSkender <[email protected]>
string
for decimal
conversionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot I want to be able to run .github/workflows/test-performance.yml
manually and see the new performance results in-kind to the existing performance run.
The |
@copilot you misunderstood my request. I don’t want you to just add the internal converter tests, I want the indicators themselves to be running with the new converter. For example, these are still running with the old string conversion:
Try again and cover all the indicators, not just those in my example. |
Co-authored-by: DaveSkender <[email protected]>
Updated all indicator implementations to use the new Key changes made in commit a7f42f8:
When you run the performance workflow now, all indicator benchmarks will use the faster conversion method. |
Co-authored-by: DaveSkender <[email protected]>
Implements and deploys a high-performance decimal conversion method that provides ~4x speed improvement across all stock indicators.
Changes Made
New conversion method: Added
to_pydecimal_via_double()
function that converts C# decimals to Python decimals via double conversion instead of string parsing, achieving ~4x performance improvement (748ms → 186ms in benchmarks).Universal deployment: Updated all indicator implementations to use the faster conversion method:
quote.py
andcandles.py
Performance benchmarks: Added benchmarks comparing both conversion methods, demonstrating consistent ~4x performance improvement across different data sizes.
Performance Impact
The
.github/workflows/test-performance.yml
workflow will now show improved performance for all indicators when run manually. This change affects every indicator calculation that involves decimal conversion, providing substantial performance gains for all users.Benchmark Results:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.