Skip to content

perf: box Variable.info, BlockEnd::Match, and Statement::EnumConstruct#9841

Draft
eytan-starkware wants to merge 1 commit intomainfrom
eytan_graphite/perf_box_large_enum_variants_and_struct_fields_to_reduce_memory_usage
Draft

perf: box Variable.info, BlockEnd::Match, and Statement::EnumConstruct#9841
eytan-starkware wants to merge 1 commit intomainfrom
eytan_graphite/perf_box_large_enum_variants_and_struct_fields_to_reduce_memory_usage

Conversation

@eytan-starkware
Copy link
Copy Markdown
Contributor

Summary


Type of change

Please check one:

  • Bug fix (fixes incorrect behavior)
  • New feature
  • Performance improvement
  • Documentation change with concrete technical impact
  • Style, wording, formatting, or typo-only change

⚠️ Note:
To keep maintainer workload sustainable, we generally do not accept PRs that
are only minor wording, grammar, formatting, or style changes.
Such PRs may be closed without detailed review.


Why is this change needed?


What was the behavior or documentation before?


What is the behavior or documentation after?


Related issue or discussion (if any)


Additional context

  Box three large/rare lowering IR fields to reduce container sizes:
  - Variable.info: TypeInfo (~160 bytes) → Box<TypeInfo> (8 bytes inline)
  - BlockEnd::Match { info }: MatchInfo → Box<MatchInfo>
  - Statement::EnumConstruct: StatementEnumConstruct → Box<...>

  Empirically selected from testing all 5 candidates individually and in
  combinations. This 3-combo gives the best ERC20 Starknet results:
  -2.8% total allocations, -2.3% peak memory. fib.cairo is neutral.

  Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

2 participants