sdf-jkl opened a new pull request, #11624: URL: https://github.com/apache/arrow-rs/pull/11624
# Which issue does this PR close? Related to #10358 # Rationale for this change As @cetra3 pointed out in [this comment](https://github.com/apache/arrow-rs/pull/10358#issuecomment-6086383082), the existing object-path `variant_get` benchmark shares one metadata dictionary across all rows and misses the regression with separate per-row dictionaries. This PR adds cases covering `json_to_variant` and `VariantArrayBuilder` output, plus a fixed unshared-metadata fixture, in response to that feedback. # What changes are included in this PR? Adds a `variant_get_object_path_metadata` group with three fixture sources: - `json_to_variant`: measures extraction from JSON conversion output. - `variant_array_builder`: inserts fields in reverse order to exercise unsorted metadata. - `per_row_metadata`: explicitly gives each row its own metadata bytes, preserving this case even if the producers later share dictionaries. Each case extracts `attr.140` as `Int32` from 8,192 rows with 300 fields, alternating between two key sets that both contain the target. Fixture creation is outside the timed loop. The producer cases can therefore reflect future improvements to metadata sharing without including conversion time. # Are these changes tested? All three cases pass a benchmark smoke run. Before timing, they assert the output length and extracted values. The fixed per-row fixture also checks that repeated dictionaries occupy distinct byte ranges. The new cases reproduce the regression when comparing #10358 at `38296248d0` with its base, `1a41738b79`: | Case | Base | PR #10358 | PR time / base time | | --- | ---: | ---: | ---: | | `json_to_variant` | 11.48 ms | 18.44 ms | 1.61× | | `variant_array_builder` | 10.60 ms | 24.28 ms | 2.29× | | `per_row_metadata` | 10.01 ms | 18.60 ms | 1.86× | These are local mean times from paired runs pinned to CPU 4, with 20 samples per case and the same compiler and dependencies. Another benchmark was running concurrently on the host. # Are there any significant user-facing changes? No. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
