Skip to content

Move to Ext trait#6843

Closed
gatesn wants to merge 1 commit intongates/array-vtable-commonfrom
ngates/array-vtable-ext
Closed

Move to Ext trait#6843
gatesn wants to merge 1 commit intongates/array-vtable-commonfrom
ngates/array-vtable-ext

Conversation

@gatesn
Copy link
Contributor

@gatesn gatesn commented Mar 9, 2026

As part of #6544

For third-party encodings, this moves constructors to the vtable struct and moves instance methods to an extension trait. When arrays become Array<V: VTable> it will not be possible for third-party arrays to define instance methods without an extension trait.

Note that in the future I'd like to strip the VTable suffix from the vtable structs, so it just becomes ALP.try_new(...) instead of ALPVTable.try_new(...)

Signed-off-by: Nicholas Gates <nick@nickgates.com>
Copy link
Contributor Author

gatesn commented Mar 9, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gatesn gatesn mentioned this pull request Mar 9, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 9, 2026

Merging this PR will degrade performance by 21.07%

❌ 22 regressed benchmarks
✅ 978 untouched benchmarks
⏩ 1466 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation patched_take_200k_dispersed 4.7 ms 5.6 ms -16.57%
Simulation patched_take_200k_first_chunk_only 4.8 ms 5.4 ms -10.69%
Simulation take_200k_first_chunk_only 3.3 ms 4.2 ms -20.89%
Simulation take_200k_dispersed 3.6 ms 4.5 ms -19.57%
Simulation decompress_alp[f64, (1000, 0.0, 0.25)] 12 µs 14.5 µs -17.11%
Simulation decompress_alp[f64, (1000, 0.0, 0.95)] 12.2 µs 14.7 µs -16.86%
Simulation decompress_alp[f64, (1000, 0.0, 1.0)] 12 µs 14.4 µs -16.71%
Simulation decompress_alp[f64, (1000, 0.01, 0.95)] 16.2 µs 18.3 µs -11.9%
Simulation decompress_alp[f64, (1000, 0.1, 0.95)] 18.3 µs 20.5 µs -10.51%
Simulation decompress_alp[f64, (1000, 0.1, 0.25)] 16.3 µs 18.5 µs -11.66%
Simulation decompress_alp[f64, (1000, 0.01, 0.25)] 16.4 µs 18.6 µs -11.59%
Simulation decompress_alp[f64, (1000, 0.01, 1.0)] 16.1 µs 18.2 µs -11.78%
Simulation decompress_alp[f64, (1000, 0.1, 1.0)] 17.3 µs 19.5 µs -11.01%
Simulation decompress_alp[f32, (1000, 0.0, 0.25)] 9.3 µs 11.8 µs -20.82%
Simulation decompress_alp[f32, (1000, 0.01, 0.25)] 13.7 µs 15.8 µs -13.45%
Simulation decompress_alp[f32, (1000, 0.0, 0.95)] 9.3 µs 11.8 µs -21.07%
Simulation decompress_alp[f32, (1000, 0.1, 0.25)] 13.6 µs 15.8 µs -13.84%
Simulation decompress_alp[f32, (1000, 0.01, 0.95)] 13.4 µs 15.6 µs -13.85%
Simulation decompress_alp[f32, (1000, 0.1, 1.0)] 14.5 µs 16.7 µs -13.02%
Simulation decompress_alp[f32, (1000, 0.1, 0.95)] 15.2 µs 17.4 µs -12.57%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing ngates/array-vtable-ext (5f8d749) with ngates/array-vtable-common (c5bdf94)

Open in CodSpeed

Footnotes

  1. 1466 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.

@gatesn gatesn closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant