[experiment] measure binding-symbol pruning (Tier-1 aliases vs Tier-2 containers)#6312
Closed
Fedr wants to merge 1 commit into
Closed
[experiment] measure binding-symbol pruning (Tier-1 aliases vs Tier-2 containers)#6312Fedr wants to merge 1 commit into
Fedr wants to merge 1 commit into
Conversation
…containers) on build time + symbol count
Contributor
Author
|
Closing — experiment complete (not for merge). Measured the build-time / symbol-count impact of mrbind
Findings:
Conclusion: there's no free |
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.
Experiment — not for merge
Measure the build-time and symbol-count impact of pruning Python-binding symbols via mrbind
--ignore/--skip-mentions-of, to separate two hypotheses:Vector_*_value_type,*_const_reference,*_iterator, etc. Per mrbind docs these become Python aliases (≈free to compile) — expected to declutter the namespace but not move build time, and--ignoremay not even suppress auto-aliases.std::vector<std::vector<…>>,std::vector<std::array<…>>,std::optional<std::variant<…>>,std::variant<…Polynomial…>, etc. — these are realpy::bind_vector/container instantiations (the hotstl_bind.hcpp_functions in the-ftime-traceprofile), so this is the actual build-time lever.Method
A single same-runner step (vcpkg x64, Release, Clang 21) does 3 full bindings rebuilds with
-B, appending flag lines to the sharedscripts/mrbind/mrbind_flags.txtbetween stages:--ignore)--skip-mentions-of)Each stage reports wall time and
len(dir(mrmeshpy))(symbol count via import). Same runner → clean deltas. Flags are edited at runtime only (nothing committed) — this is a measurement, not a change.Because the flags live in
mrbind_flags.txt(loaded bygenerate.mkfor every platform/config), whichever ignores prove worthwhile would apply everywhere with a one-line edit.CI scoped to linux-vcpkg only (other platforms disabled via labels).