Skip to content

0.156.3: the depth scan in half 0.156.1's time on a dense file - #70

Merged
tmoosting merged 1 commit into
mainfrom
depth-scan-constant
Nov 27, 2026
Merged

tmoosting merged 1 commit into
mainfrom
depth-scan-constant

Conversation

@tmoosting

Copy link
Copy Markdown
Member

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

…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>
@tmoosting
tmoosting merged commit 15a8f0f into main Nov 27, 2026
11 checks passed

This branch was previously deployed

1 inactive deployment
pypi — 15a8f0f1 Deployed Nov 27, 2026 by tmoosting via publish #251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant