Repository navigation
0.156.3: the depth scan in half 0.156.1's time on a dense file - #70
Merged
Merged
Conversation
…cktracks, half 0.156.1's time 0.156.1 stepped through every bracket, quote and backslash in Python: 129 ms on 50,000 small objects (2.2 MB) where 0.156.0 took 54. A possessive pattern cuts each string out, an open one to the end, and the brackets left are counted as a running sum: 61 ms, 17 ms on a 1 MB open string of escaped quotes. Held to 0.156.1's answers on 500,000 random texts, none differing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was previously deployed
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.
0.156.1 made the depth check linear by stepping through every bracket, quote and backslash in Python; on 50,000 small objects (2.2 MB) that took 129 ms where 0.156.0 took 54 (9-run medians, measured twice). Strings are now cut out by one possessive pattern (an open string runs to the end, a lone trailing backslash included), and the brackets left are counted with
accumulate: 61 ms on the same file, 17 ms on a 1 MB open string of escaped quotes.Held to 0.156.1's loop on 500,000 random texts over five alphabets, 0 differing; four edge cases added to
tests/test_outside_json.py, each checked against the old loop; the existing 20,000-text test against 0.156.0's reading and both timed tests pass.🤖 Generated with Claude Code