Repository navigation
docs: allow justified slower shapes in expression optimizations, add code guidelines - #7539
Conversation
comphead
left a comment
There was a problem hiding this comment.
The new rule reads consistently across the guide, AGENTS.md and the three files under .ai/skills. One gap it leaves in what gets recorded after merge.
| nulls but 30% slower with dense nulls costs the many real columns that have dense nulls, so either | ||
| gate the fast path behind a runtime check that picks the right path per batch, or do not submit it. | ||
| A Comet optimization PR was closed for exactly this reason. A claim that a shape is rare needs | ||
| evidence about real workloads, not an assertion. |
There was a problem hiding this comment.
Now that a merged optimization can make a shape slower, could "Record the performance audit" below ask for that too? Its template records the technique, the speedup, the PR and the benchmark, so the audit entry, which is what the next person tuning the expression reads, would not show that a shape was traded away or why. A clause such as "and any shape that got slower, with its cost" in the template, plus the same in the PR conventions' Testing line, would keep the justification next to the history. Two existing entries in expression-audits/conversion_funcs.md already say "no regression on any shape", so the line has room for it.
There was a problem hiding this comment.
Thanks, added. The audit template's guidance in optimizing_expressions.md and step 9 of the optimize-comet-expression skill now ask for any shape that got slower with its cost, and the PR conventions' Testing line asks for the cost and justification.
andygrove
left a comment
There was a problem hiding this comment.
The PR backlog is huge and the maintainers don't have the bandwidth to review them all, so here is an automated review. Feel free to ignore it.
Thanks for tightening the guidance here. The slower-shape rule reads consistently across optimizing_expressions.md, optimize-comet-expression/SKILL.md, review-comet-pr/SKILL.md and review-comet-expression-pr/SKILL.md, and I did not find a leftover "no regression" statement elsewhere under .ai or the contributor guide. The gap comphead raised about the audit entry template is the one I would also want closed.
One new line in AGENTS.md is broader than the page it points to. The config bullet says renames and removals "need a deprecated alias and a major release". config_conventions.md says in "Renaming an Existing Config" that keys in the testing category and keys marked internal() are exempt from the versioning policy and may be renamed outright, with no alias. An agent following the bullet literally would add withAlternative aliases for those keys. Could the bullet say that the rule applies to keys covered by the versioning policy, and link to that section?
Thanks, done. The bullet now says the alias and major release apply to keys covered by the versioning policy, states that |
Which issue does this PR close?
N/A.
Rationale for this change
add,subandmularrow-rs#12062, perf(arrow-arith): vectorize checked integeradd,subandmularrow-rs#12058) and the expense of slowing the exceptional case (overflow). That seems reasonable to me.What changes are included in this PR?
How are these changes tested?
N/A.
AI Disclosure
Claude Sonnet helped draft this, but I stand by the content.