ColorsPanel: for loop check condition simplify for optimize#2041
ColorsPanel: for loop check condition simplify for optimize#2041GermanAizek wants to merge 1 commit into
Conversation
Access by index in array heavy operation vs check i index with const var LAST_COLORSCHEME
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTwo loops in ColorsPanel.c that iterate over color schemes were changed to use Changes
Sequence Diagram(s)Not applicable — this change is a simple loop-bound substitution with no new control flow or interactions to diagram. Estimated code review effort: Medium Related issues: None provided Related PRs: None provided Suggested labels: bug, cleanup Suggested reviewers: None provided Poem
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 |
@natoscott, isn't it easier to check each step in the loops with this PR condition?
Access by index in array heavy operation vs check i index with const var LAST_COLORSCHEME
Clion IDE have diff view Code and Assembly with compiler flags.
Out of interest, I can show how much less x86 instructions it should give on -O3.