Skip to content

perf(buffer): store alignment exponents - #9730

Merged
gatesn merged 1 commit into
developfrom
ngates/buffer-alignment-exponent
Sep 2, 2026
Merged

gatesn merged 1 commit into
developfrom
ngates/buffer-alignment-exponent

Conversation

@gatesn

@gatesn gatesn commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Store Alignment as its base-2 exponent instead of a usize.

Changes

  • Shrink Alignment from 8 bytes to 1 byte.
  • Remove Deref and convert to bytes explicitly with as_usize().
  • Keep the accepted alignments and serialized exponent unchanged.

@gatesn gatesn changed the title ngates/buffer alignment exponent perf(buffer): store alignment exponents Sep 2, 2026
@gatesn gatesn added the changelog/fix A bug fix label Sep 2, 2026
Signed-off-by: Nicholas Gates <nick@nickgates.com>
@gatesn
gatesn marked this pull request as ready for review September 2, 2026 14:47
@gatesn
gatesn force-pushed the ngates/buffer-alignment-exponent branch from 2fd0632 to 79d06ff Compare September 2, 2026 14:47
@gatesn gatesn added the changelog/performance A performance improvement label Sep 2, 2026
@gatesn
gatesn marked this pull request as draft September 2, 2026 14:49
@gatesn gatesn removed the changelog/fix A bug fix label Sep 2, 2026
@gatesn
gatesn marked this pull request as ready for review September 2, 2026 15:19
@codspeed

codspeed Bot commented Sep 2, 2026

Copy link
Copy Markdown

Merging this PR will regress 2 benchmarks

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 4 improved benchmarks
❌ 2 regressed benchmarks
✅ 2130 untouched benchmarks
⏩ 164 skipped benchmarks1
🗄️ 1 archived benchmark run2

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ WallTime arrow_checked_add_u32_neon[16384] 13.5 µs 20.3 µs -33.57%
❌ WallTime mul_u32_nonnull_avx512 5.6 µs 6.4 µs -12.1%
⚡ WallTime arrow_checked_add_u32_avx512[16384] 21.3 µs 17.6 µs +20.83%
⚡ WallTime arrow_checked_add_u32_avx2[16384] 21.3 µs 17.7 µs +20.35%
⚡ Simulation compact[(1024, 90)] 1.6 µs 1.4 µs +11.57%
⚡ Simulation compact[(2048, 90)] 1.6 µs 1.5 µs +11.11%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ngates/buffer-alignment-exponent (79d06ff) with develop (aaed723)

Open in CodSpeed

Footnotes

  1. 164 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. 1 benchmark was run, but is now archived. If it was deleted in another branch, consider rebasing to remove it from the report. Instead if it was added back, click here to restore it. ↩

@gatesn
gatesn merged commit 9a88ef6 into develop Sep 2, 2026
134 of 138 checks passed
@gatesn
gatesn deleted the ngates/buffer-alignment-exponent branch September 2, 2026 15:35
robert3005 pushed a commit that referenced this pull request Sep 9, 2026
Brings in the allocator-backed buffers (#9668, #9669, #9807) and the exponent
`Alignment` (#9730). Conflicts are resolved in favour of develop's buffer API
and internals: the tagged-word storage from this branch is re-applied under that
API in the next commit rather than merged line by line.

`Alignment` stays in `vortex-bytes`, now with develop's `u8` exponent
representation and without `Deref`. The two `scalars.rs` hunks keep
`into_vec`, which the next commit restores.

The library builds at this commit; `vortex-buffer`'s own tests and benches
target the API the next commit restores.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bk1yU7fmfhiFrPzF888VmT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants