Skip to content

v0.5.0

Compare
Choose a tag to compare
@lxsmnsyc lxsmnsyc released this 15 May 14:17
· 113 commits to main since this release

This release adds a new optimization process on top of the current memoization process. Forgetti will now run the transform as follows:

  1. Pre-inlining
    Variable declarations that can be inlined are recursively inlined. This allows the memoization step to know the largest possible constant expression and cache it in a single entry.
  2. Expansion
    Assignment expressions and hooks had issues in optimization in 0.4.x. With the expansion step, these expressions are now moved before the parent statement path, and ensures that these expressions are called out of their rules.
  3. Simplify
    Some expressions that are guaranteed to have literal evaluation are evaluated in compile-time.
  4. Memoization
    This is where the old core runs. A major difference compared to 0.4.x now is that the memoization process will test first if the entire expression is a "constant" to save more cache slots. Previously, it would subdivide naively, generating unnecessary amount of caching.
  5. Post-inlining
    Same process as step 1. This allows generated variables to be inlined so that there's less output.

Changes

Full Changelog: v0.4.7...v0.5.0