perf: reduce allocations in the printer and string-list sorting - #1476
perf: reduce allocations in the printer and string-list sorting#1476jbedard wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request optimizes the seq method in build/print.go by only copying the argument slice when a nil element is present. The reviewer suggested a further optimization to avoid a full second pass over the slice by copying the non-nil prefix and iterating only over the remaining elements.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
1216415 to
b0c00d5
Compare
|
Cleaning up past reviewers due to lack of capacity, and buildtools were now moved to be |
b0c00d5 to
a5eaa2f
Compare
Buildtools PR checklist
Description
Reduce array copying to only when necessary, which seems like the exception and not the norm.