[pull] master from cube-js:master#461
Merged
Merged
Conversation
…ive (-95%, ~20x parse) (#10853) The derived `#[serde(untagged)]` impl funnels every value through `serde::__private::de::Content`, materializing an intermediate tree per element. For wire payloads dominated by strings/numbers/null (the common CubeStore row shape) that buffering is the bottleneck. A direct `Visitor` dispatches on the JSON token in one pass; only the rare seq/map branches pay the `Value`-materialization cost via `Uncommon`. Measured on `QueryResult::from_js_raw_data` bench (criterion, 100 samples for c16; --quick elsewhere): | Bench | Before | After | Difference | Speedup | Faster by | | ------------------------------ | ---------- | --------- | ----------- | ------- | --------- | | parse_only / c08_r10000 | 39.80 ms | 1.96 ms | -37.84 ms | ~20x | -95.1% | | parse_plus_build / c08_r10000 | 39.99 ms | 2.25 ms | -37.74 ms | ~18x | -94.4% | | parse_only / c16_r10000 | 82.39 ms | 4.03 ms | -78.36 ms | 20.4x | -95.1% | | parse_plus_build / c16_r10000 | 79.94 ms | 4.79 ms | -75.15 ms | 16.7x | -94.0% | | parse_only / c16_r100000 | 836.81 ms | 40.25 ms | -796.56 ms | 20.8x | -95.2% | | parse_plus_build / c16_r100000 | 832.44 ms | 55.58 ms | -776.86 ms | 15.0x | -93.3% | | parse_only / c32_r100000 | 1662.60 ms | 81.66 ms | -1580.94 ms | ~20x | -95.1% | | parse_plus_build / c32_r100000 | 1677.50 ms | 114.22 ms | -1563.28 ms | ~15x | -93.2% | Throughput on pure parse jumps from ~2 Melem/s to ~40 Melem/s. `parse_plus_build` gains less because the transpose into `QueryResult` now dominates once parsing is cheap.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )