Merged
Conversation
d785240 to
86b3778
Compare
sjquant
commented
Apr 16, 2026
Collaborator
Author
There was a problem hiding this comment.
이번 작업이 적용되는 친구들 중 분리안되어있는 친구들은 다 분리해뒀습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
여러 지표의 signal 계산 경로에서 임시 압축 벡터를 만들지 않고, 기존
Vec<Option<f64>>정렬을 유지한 채 EMA/SMA를 직접 계산하도록 최적화했습니다.변경 사항
core/src/indicators/ema.rs에ema_aligned추가core/src/indicators/sma.rs에sma_aligned추가macd_signalppo_signalpvo_signalobv_signalsonarsignalnvisignalpvisignalmassi내부 EMA 경로eomsignal SMA 경로변경 이유
기존 구현은 공통적으로 다음 비용을 반복해서 지불하고 있었습니다.
filter_map(...).collect()로 유효 구간만 새 벡터로 압축EMA또는SMA적용하지만 이 지표들은 대부분 첫 유효 값 이후 구간이 이미 정렬된 형태이므로, 임시 벡터를 만들지 않고도 같은 결과를 계산할 수 있습니다.
벤치마크
origin/main(cb2e4ff) 대비,techr-corerelease 벤치 1,000,000 rows, 5회 실행 중앙값 기준입니다.macd_signal12.8ms9.6ms-25.0%macd_hist13.0ms9.9ms-23.8%ppo_signal14.0ms9.7ms-30.7%ppo_hist14.2ms9.7ms-31.7%pvo_signal13.4ms9.9ms-26.1%pvo_hist12.4ms9.8ms-21.0%obv_signal6.4ms3.7ms-42.2%sonar_signal9.5ms6.7ms-29.5%nvi_signal7.9ms5.0ms-36.7%pvi_signal6.8ms4.2ms-38.2%massi_signal17.0ms11.9ms-30.0%eom_signal10.0ms6.2ms-38.0%벤치마크 스크립트
검증
cargo test --manifest-path core/Cargo.tomlcargo check --manifest-path polars/Cargo.tomlcd polars && uv run pytest