revert(perf): retire unmeasured R micro-optimizations - #298
Conversation
1. `R/surveyFA.R`: `names(sort(x))[1L]`를 `names(which.min(x))`로 교체하여 O(N log N) 정렬 비용을 없애고 O(N) 선형 탐색으로 최적화함. 2. `R/surveyFA.R`, `R/aFIPC.R`: `length(stats::na.omit(unique(x)))` 및 `length(unique(stats::na.omit(x)))`를 `sum(!is.na(unique(x)))`로 대체함. `stats::na.omit` 호출로 인한 불필요한 S3 메서드 디스패치 및 `na.action` 속성 할당(메모리 오버헤드)을 제거하고 순수 논리 벡터 연산으로 성능을 향상시킴. 3. `.jules/bolt.md`: 해당 최적화와 관련된 R 성능 향상 지식 기록 추가.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning Review limit reachedNext included review available in 8 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughR 코드의 고유값 개수 계산을 ChangesR 성능 최적화
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change replaces equivalent R implementations with more efficient minimum lookup and unique non-NA counting, with no actionable merge-blocking risk remaining after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
No-valid-delta closure after repair.
Fresh review applied the repository's numerical-behavior guardrail rather than treating passing legacy tests as performance evidence. The branch originally mixed two micro-optimizations with broad 2–3× claims but supplied no repository-controlled benchmark artifact fixing representative data shapes/classes, R/runtime version, CPU, warm-up/repetition, allocation/GC, or an end-to-end calibration/linking performance measure.
The extrema rewrite was already withdrawn on predecessor repair
20fd14400e8329f865a1e1989d3c37a69578f836, and its generated.jules/bolt.mddoctrine was removed. The only remaining production delta changed distinct-non-NA counting inR/aFIPC.RandR/surveyFA.R. Although review classified the common standard-vector result as numerically equivalent, this repository explicitly prioritizes historical numerical behavior inR/aFIPC.Rand requires regression evidence before algorithmic edits. There was still no focused class/NA edge contract or measured buyer/runtime benefit justifying that production churn.Repair head
50527c4441b5b6b1734f032777c7d7c6a2ddaf3eis a normal non-force descendant that adopts protectedmaster@f87c2324f1686135e57d8730c1b0b9420874f300while preserving all experimental history. Fresh compare is ahead-only (ahead_by=3,behind_by=0) withfiles=[]. Both informational review threads are resolved against the restored tree.There is therefore no production/test/doc semantic delta left to integrate. A future optimization should start with a reproducible representative benchmark/profile, explicit equivalence fixtures for the affected R classes/NA cases, and then a minimal measured change.