Repository navigation
[pull] main from apache:main - #947
Merged
Merged
Conversation
### Rationale for this change Resolves #51470: `simdjson` has a multi-stage parser that first finds structural elements in the entire buffer (including document boundaries). Only the second stage, which is lazy, actually need to parse the documents. Similarily `parse_many` already computes all document boundaries and we can iterate its output to consume the documents without parsing any documents: https://github.com/simdjson/simdjson/blob/6913ee1a17a57d23a2e9f458d8e04e96cd43ecab/doc/parse_many.md?plain=1#L85-L88 ### What changes are included in this PR? This delimits JSON documents without fully parsing them ### Are these changes tested? Yes. before: ``` ChunkJSONPrettyPrinted 528656 ns 528396 ns 1340 bytes_per_second=394.823Mi/s json_size=218.757k ChunkJSONPrettyPrintedMultipleBlocks 664758 ns 625186 ns 1143 block_size=27.344k bytes_per_second=333.697Mi/s json_size=218.757k ``` after: ``` ChunkJSONPrettyPrinted 91815 ns 91811 ns 7358 bytes_per_second=2.21906Gi/s json_size=218.757k ChunkJSONPrettyPrintedMultipleBlocks 197358 ns 167654 ns 3719 block_size=27.344k bytes_per_second=1.2152Gi/s json_size=218.757k ``` ### Are there any user-facing changes? No. ### Was AI used for this PR? In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR. **PR code and description written by:** - [X] Human - [ ] (AI assisted in code drafting for the initial version) **Reviewed before submission by:** - [X] Human - [ ] AI - [ ] Not reviewed * GitHub Issue: #51470 Authored-by: Alexander Taepper <alexander.taepper@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
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 : )