Skip to content

More compiler optimizations towards full gc fdsjkdsl#2030

Merged
andrew4328 merged 7 commits intoLambda-Mountain-Compiler-Backend:mainfrom
andrew4328:more-compiler-optimizations-towards-full-gc-fdsjkdsl
Apr 10, 2026
Merged

More compiler optimizations towards full gc fdsjkdsl#2030
andrew4328 merged 7 commits intoLambda-Mountain-Compiler-Backend:mainfrom
andrew4328:more-compiler-optimizations-towards-full-gc-fdsjkdsl

Conversation

@andrew4328
Copy link
Copy Markdown
Collaborator

@andrew4328 andrew4328 commented Apr 10, 2026

Describe your changes

Features:

  • add a term count profiler that counts how many terms are allocated before and after preprocessing/typechecking
  • add support for suffix rewriting in macros 2.0
  • move some core macros to macros 2.0 (no significant performance impact so far)
  • move some redundant temporary allocations to be constants
    • it is easy to underestimate how impactful this would be
    • t2(c"Arrow", t0(c"Any"), t0(c"Any")) creates at least 3 new heap allocations
  • down to 9.5GB run allocation for GC-disabled compiler
  • down to 7.8 minutes for all tests to run from 9.5 minutes last commit

Issue ticket number and link

#1895

Checklist before requesting a review

  • [ x ] I have performed an AI-assisted self-review of my code.
Can you review my pull request and provide some suggestions?
https://patch-diff.githubusercontent.com/raw/Lambda-Mountain-Compiler-Backend/lambda-mountain/pull/1926.diff
  • [ x ] If it is a new feature, I have added thorough tests.
  • [ x ] I agree to release these changes under the terms of the permissive MIT license (1).
  1. https://github.com/andrew-johnson-4/lambda-mountain/blob/main/LICENSE

@andrew4328 andrew4328 merged commit d9bb1fb into Lambda-Mountain-Compiler-Backend:main Apr 10, 2026
1 check passed
@andrew4328 andrew4328 deleted the more-compiler-optimizations-towards-full-gc-fdsjkdsl branch April 10, 2026 04:26
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.

1 participant