Repository navigation
Speed up strict payload comparison with paired traversal - #2693
Merged
Merged
Conversation
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.
PR2040's strict comparator builds two full tagged JSON trees for nonidentical payloads. This opt-in, source-authenticated successor compares positive cases by paired traversal and delegates every negative/invalid case to the unchanged original comparator, preserving complete diagnostics. Duplicate keys, exact numeric types, injective path tags, unknown fields, array order and both original timing paths remain checked.
On the five largest frozen compressed JSON payloads, three alternating-order CPython3.12.14 Windows trials reduced the sum of per-file median full-call times from16.111s to6.584s (2.447x). This includes decompression/parsing, is machine-dependent, and is not a speed threshold. Negative comparisons can be slower; peak memory was not measured.
Validation:1,012 exact full-result differential calls, including the retained105-file/39-adverse audit,625 additional semantic cases and22 large reformats; all15 control groups; registered3.12 replay; optimized3.14 Git-free/read-only export and actual Boolean-receipt rejection; separate code review clear; all25 committed package/input byte streams match tested files. Reproduce with
python3 scripts/research_package.py --package research/strict-payload-paired-walk.Started on current main8513ab11 and checked/fast-forwarded to b5ea56e before submission; guidance and all live inputs unchanged. Originating source pins remain8513. Final overlap covers786 open PRs at17:34UTC and1,239 Discussion records at15:22UTC; Discussion freshness is limited by exhausted GraphQL quota. Claim:#2040 (comment).
Credit:commdata2338 for PR2040, Josie Elliston for the predecessor portability comparator, Rohan Arun and retained supplier authors for the corpus. Prepared by ywz65 with substantial OpenAI Codex assistance. No supplier cold replay, hosted-CI result, selected-frontier change or new kappa is claimed. PR2344 Windows-root adaptation remains separate.