Skip to content

Enable Maglev #50690

Closed
Closed
@kvakil

Description

@kvakil

What is the problem this feature will solve?

V8 recently introduced their new Maglev compiler which is a mid-tier compiler (blog post, design doc).

We currently do not compile or ship Maglev.

What is the feature you are proposing to solve the problem?

Build and enable Maglev. Proposed plan:

  1. Get Maglev to actually compile with our settings.
  2. Run some benchmarks and post them here.
  3. Add a configuration option to compile with Maglev enabled.
  4. Upstream V8 patches to get Maglev compilation working.
  5. Cherry-pick upstream patches back to this repo.
  6. Flip the configuration flag to default-on and ship Maglev.

Open questions

  1. Do we want to ship this?
  2. Should turning the configuration flag to default-on be semver major? Or maybe it only needs to be dont-land-on-v20.x, and we can ship it as part of v21?

What alternatives have you considered?

We could also not enable Maglev, which is a valid choice.

Pros of shipping:

  • Will likely be faster?
  • Gets us closer to Google Chrome which ships Maglev.

Cons of shipping:

  • As a mid-tier compiler Maglev may not bring much performance benefit for long-running server-like workloads.
  • Enabling Maglev may cause performance regressions for users.
    • Users can disable Maglev with the V8 option --no-maglev but it may be difficult to figure out that Maglev is causing the regression.
  • Potentially leads to more maintenance burden from V8 changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.performanceIssues and PRs related to the performance of Node.js.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions