Repository navigation
[Variant] Add unshred_variant benchmarks - #12079
Merged
Merged
Conversation
No benchmark called unshred_variant, directly or through variant_get. Add seven cases to variant_kernels covering primitives, fully typed and partially shredded objects, sorted and unsorted metadata dictionaries, a nested fallback value, and lists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
Jefffrey
approved these changes
Nov 5, 2026
Member
Author
|
Thanks @Jefffrey @Rich-T-kid 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
No benchmark calls
unshred_variant, directly or throughvariant_get, so changes to this kernel can't be compared on the existing suite. #11106 is a current example: it changes how nested fallback values are written, and nothing measures that path.What changes are included in this PR?
Adds seven
unshred_variantbenchmarks tovariant_kernels, each processing 8,192 rows. The cases are chosen so that a change to one path should not move the others.unshred_variant_primitiveunshred_variant_object{first, last, age}, fully typedunshred_variant_partial_objectunshred_variant_partial_object_unsorted_metadataunshred_variant_nested_fallbackunshred_variant_listList<Float64>, 0 to 100 elements per rowunshred_variant_list_of_objectsTimes are medians of 3 Criterion runs on one workstation, to show scale only.
Left out on purpose: the unshredded fast path, because it is a constant-time clone, and other primitive types and metadata encodings, which stayed within about 12 ns and about 5% of these cases in ad hoc runs.
The partial object schema and the JSON-to-variant setup move into small helpers shared with existing benchmarks, and the object fixture can now take its dictionary order. The existing benchmarks keep their names and workloads.
Are these changes tested?
This is benchmark-only. As a check that the suite catches what it is for, applying the source changes from #11106 moves
unshred_variant_nested_fallbackfrom 10,223 to 18,917 ns per row (1.85x), while the other six cases stay between 0.99x and 1.03x.Are there any significant user-facing changes?
No, only benchmark code changes.
🤖 Generated with Claude Code