Use Prepack's evaluator for constant evaluation
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
If we switched out Babili's constant evaluation with the Prepack's I think this would push Babili to the winning side in terms of bundle size and potentially execution time. It doesn't have to use all of Prepack's fanciness -- just evaluating straightforward constants (no "abstract interpretation" and
"heap serialization").
On the downside, this will surely add to the compile time and might become more of a pressing problem (it can be then switched on/off via an option).
Contributor guide
Research direction
No files, tests, or entry points are named. Start by locating Babili's current constant-evaluation path and the relevant Prepack evaluator, then determine how straightforward constants could be handled without abstract interpretation or heap serialization. Define how compile-time cost and an optional on/off setting should be tested before attempting the integration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- performance, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100