v0.5.0
This release adds a new optimization process on top of the current memoization process. Forgetti will now run the transform as follows:
- 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. - 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. - Simplify
Some expressions that are guaranteed to have literal evaluation are evaluated in compile-time. - 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. - Post-inlining
Same process as step 1. This allows generated variables to be inlined so that there's less output.
Changes
- Fix #14 by @SukkaW in #15
- Fix nested hook call by @SukkaW in #18
- Fix hook expr optimization and add optimization steps by @lxsmnsyc in #20
- Add cache to isConstant and isContainsHook by @SukkaW in #19
- Feat: accept exclude components options by @SukkaW in #17
- 0.5.0 by @lxsmnsyc in #21
Full Changelog: v0.4.7...v0.5.0