Repository navigation
perf(aggexec): fill Decimal64 combiner slots with word stores - #31482
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: ef57b7215a197526a5a31309b89587e1f0cdb3aa
Assessment: approve
Reviewed the complete six-file delta and discussion. The bounded word stores preserve sentinel initialization, probing, fallback and ownership. Historical regressions concern rejected alternatives; the accepted issue contract permits uncertain target-query gains. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
Validation:
-
Isolation preflight and native provenance checks passed. Current-head aggexec and group suites passed 615 and 219 root tests respectively, with no skips or failures. Both new regressions also passed against the frozen baseline.
-
Compared baseline and candidate across 30 component cases using six balanced process pairs, then nine cases with longer measurements. Neither comparison produced a slower confidence interval; several results remained inconclusive. Verified generated word-store instructions.
-
Read all PR discussion entries and linked issue30847's body and six comments. Saved discussion-assessment.json and review-notes.json.
-
Commands, source fingerprints, exits and retained logs are reconciled in /home/xupeng/.local/state/mo-bot/jobs/733abef229c2a9877d88574f/attempt-1/validation-audit.json. Final audit receipt checks/1793128551606651087-3.json records exit 0 and an unchanged frozen head.
Limitations:
-
Author SF10 and hardware-counter results remain attributed reports: raw execution artifacts were unavailable. No independently established query-level speedup is claimed.
-
Local component measurements were noisy and do not establish performance equivalence across platforms.
-
SF100 and mixed-I/O validation remain outside this PR's accepted scope. Frozen CI statuses were inspected without individual case logs.
🚫 Left the queue3 h in the queue, with no time running CI. So far
Reason Pull request #31482 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Hint You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Merge conditions: 2 of 3 metThis pull request
The batch, tested in place
Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30847. This scopes the work to slot initialization; local SF10 validation does not close the broader SF100 and mixed-I/O acceptance requirements.
What this PR does / why we need it:
The Decimal64 grouped SUM/AVG combiner initializes its 256-byte local slot table with one byte store per loop iteration. Fill the same table with 32 bounds-safe eight-byte stores through
encoding/binary.LittleEndian.PutUint64. The all-one word preserves the existing0xffbyte sentinel on every architecture and reduces initialization work without a source-copy operation or new allocation.The existing hash, 255-entry capacity, wraparound, full-table fallback, per-row accumulation and final scatter keep their algorithm and indexing. Add SUM/AVG regressions for colliding hashes that wrap from bucket 255 to 0, the final local slot and repeated-group fallback, offsets and multiple state chunks. Retain a caller-shaped benchmark matrix for reproducing the complete update cost.
Design
Reviewed design revision: Decimal64 grouped-combiner slot stores.
Validation
Performance
Clean main
c4946bb74dversus runtime candidate5c816098da(published headef57b7215a; later commits contain documentation and the identical measured fixtures only), local SF10 on eight dedicated physical cores of an AMD Ryzen 9 7950X3D, 16 GiB CN cache and a 32 GiB whole-application budget. Ordinary Go 1.27.1 SIMD/v3 builds use identical verified native libraries; no production overlays, PGO or alignment overrides. Native preparation uses the recorded C-only jemalloc configure profile for this host compiler.Full Q1-Q22 context: six balanced independent process pairs, one scored warm call per query per arm; each query's first cold call is excluded. Q1 and Q18 have lower observed paired medians, but neither interval excludes no change. No query has a slower interval in this screen; several higher point estimates remain inconclusive. This is limited local evidence, not proof of zero possible regressions or a statistically established query speedup.
Separate Q1/Q18 context: six balanced process pairs with three scored warm calls per query measured Q1 +0.76% (95% interval -3.13% to +2.75%) and Q18 +0.84% (-4.32% to +5.26%). These inconclusive higher estimates are retained separately from the full-suite observations. No profile timings enter either latency comparison.
All 24 retained timing arms passed the recorded all-memory and sampled-background gates, with zero measured physical reads/writes, spill or application swap. The maximum conservative whole-application footprint was 22.86 GiB. Benchmark workers execute/drain queries without input, table, schema, row, reference, result-value or checksum verification. No SF100 run was made locally.
Complete component costs: the 30-case, six-pair screen includes real 256-row calls, separate 8192-row API controls, sparse/permuted and many-chunk states, NULL/constants, tiny/empty, growth and DISTINCT. It has no slower interval and unchanged allocation counts/bytes. An independent one-second-per-result, six-pair check of the eight inconclusive large-batch/NULL/DISTINCT cases also has no slower interval; those cases remain inconclusive.
Two balanced warm-only fixed-work counter pairs, each with 200,000 iterations after excluding the first 200,000-iteration run, measured:
Separate six-warm-call query profiles measured Q18 instructions -0.71% and user cycles -0.23%, while Q1 instructions were +0.12% and cycles +0.62% in that single profile pair. The query-wide effect is much smaller than the component control gains; these sampled runs do not establish a latency change or a unique cause.