Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 7, 2026

Summary

  • Delete intermediate Match struct (with Vec fields) that existed only as allocation overhead
  • Rename MatchViewMatch - this zero-copy view is now the only Match type
  • Inline serialization directly in MatchIR::resolve() instead of going through Match::to_bytes()

Why

The bytecode layer had three redundant representations: MatchIR (compile-time), Match (intermediate with Vecs), and MatchView (runtime). The middle layer existed only to allocate temporary Vecs during resolve() before immediately serializing them. This refactoring eliminates that wasteful allocation path.

@zharinov zharinov merged commit 3594700 into master Jan 7, 2026
4 checks passed
@zharinov zharinov deleted the refactor/eliminate-match-alloc branch January 7, 2026 14:49
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