Repository navigation
Conversation
…deserialization Scalars skip the Expression deserialization that always failed and built a large error per call, and contract evaluation normalizes each type string once per request. Adds contracts_cpu_ms to compile timings and a same-runner python vs native-preview gate on it.
…guard model analysis CPU
…e CPU timer domain-private
kvlonge
enabled auto-merge
October 9, 2026 18:26
kvlonge
disabled auto-merge
October 9, 2026 18:26
This was referenced Oct 9, 2026
Contributor
Author
|
Landed together in #1075 to cut merge-queue CI runs; review history stays here. |
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.
Why
Under
native-preview, model analysis took 13.0-13.5s CPU on dense 3,000 models vs ~4.2s for Python. The session analysed every model alone; Python shares one analysis across models whose query differs only in relation names (574 queries vs 2,997).Changes
prepare_binding_queriesdoes (stubs, keys, two-member minimum) and re-analyse inexact results alone. Eligibility is never wider than Python's.NativeModelAnalysisSession.sharingreports shared and re-analysed counts.model_analysis_cpu_msphase (process CPU), one timer shared with wall phases.--compile-arg; CI ratio entry gatesmodel_analysis_cpu_msat 1.50x Python + 50ms with--select=*.Changed expectations:
model_analysis_cpu_msin compile JSON timings; new ratio E2E case; parity cases 22/6/2 and 4/0/3 shared/re-analysed/unshared.Known residuals:
model_analysis_cpu_msis process-wide, so without--select=*it includes early-lint threads.binding_shapesleaves the key: it follows the same relation facts asanalysis_shapes, whose removal fails.Verification
analysis_shapesfrom the key fails parity.make check-ci;make test(11949 passed); hygiene.