babel / babel/minify

Use Prepack's evaluator for constant evaluation

Open
#519 3 comments 4 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.