Skip to content

feat: optimize the literal value of unary expressions#5812

Merged
lukastaegert merged 2 commits intomasterfrom
optimize-unary-expressions
Jan 31, 2025
Merged

feat: optimize the literal value of unary expressions#5812
lukastaegert merged 2 commits intomasterfrom
optimize-unary-expressions

Conversation

@TrickyPi
Copy link
Copy Markdown
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

Optimize the literal value of unary expressions to enhance tree-shaking.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2025 1:57pm

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 25, 2025

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#optimize-unary-expressions

Notice: Ensure you have installed the latest stable Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust.

or load it into the REPL:
https://rollup-fqugh63yw-rollup-js.vercel.app/repl/?pr=5812

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 25, 2025

Performance report

  • BUILD: 7228ms, 732 MB
    • initialize: 0ms, 27.3 MB
    • generate module graph: 2733ms, 549 MB
      • generate ast: 1236ms, 543 MB
    • sort and bind modules: 389ms, 593 MB
    • mark included statements: 4117ms, 732 MB
      • treeshaking pass 1: 1360ms, 699 MB
      • treeshaking pass 2: 646ms, 715 MB
      • treeshaking pass 3: 272ms, 726 MB
      • treeshaking pass 4: 253ms, 730 MB
      • treeshaking pass 5: 293ms, 732 MB
      • treeshaking pass 6: 241ms, 733 MB
      • treeshaking pass 7: 228ms, 732 MB
      • treeshaking pass 8: 218ms, 732 MB
      • treeshaking pass 9: 202ms, 730 MB
      • treeshaking pass 10: 204ms, 736 MB
      • treeshaking pass 11: 202ms, 732 MB
  • GENERATE: 695ms, 973 MB
    • initialize render: 0ms, 868 MB
    • generate chunks: 71ms, 879 MB
      • optimize chunks: 0ms, 872 MB
    • render chunks: 609ms, 948 MB
    • transform chunks: 15ms, 973 MB
    • generate bundle: 0ms, 973 MB

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.79%. Comparing base (abcf4fe) to head (4df25ac).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5812   +/-   ##
=======================================
  Coverage   98.79%   98.79%           
=======================================
  Files         260      260           
  Lines        8116     8119    +3     
  Branches     1369     1371    +2     
=======================================
+ Hits         8018     8021    +3     
  Misses         72       72           
  Partials       26       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

Copy link
Copy Markdown
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@lukastaegert lukastaegert added this pull request to the merge queue Jan 31, 2025
Merged via the queue into master with commit 650b885 Jan 31, 2025
35 checks passed
@lukastaegert lukastaegert deleted the optimize-unary-expressions branch January 31, 2025 05:58
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 1, 2025

This PR has been released as part of rollup@4.33.0. You can test it via npm install rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants