Skip to content

perf: replace startsWith with strict equality#6094

Merged
lukastaegert merged 1 commit intorollup:masterfrom
btea:perf/replace-startsWith-with-strict-equality
Sep 7, 2025
Merged

perf: replace startsWith with strict equality#6094
lukastaegert merged 1 commit intorollup:masterfrom
btea:perf/replace-startsWith-with-strict-equality

Conversation

@btea
Copy link
Copy Markdown
Contributor

@btea btea commented Sep 6, 2025

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

When determining the value of the first letter of a string, using strict equality is more efficient than startsWith. refer to link

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rollup Ready Ready Preview Comment Sep 6, 2025 3:03pm

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.

Makes sense, thanks!

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 7, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.79%. Comparing base (a2744ea) to head (e3c8755).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/Chunk.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6094   +/-   ##
=======================================
  Coverage   98.79%   98.79%           
=======================================
  Files         271      271           
  Lines       10622    10622           
  Branches     2840     2840           
=======================================
  Hits        10494    10494           
  Misses         88       88           
  Partials       40       40           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lukastaegert lukastaegert merged commit 235dc74 into rollup:master Sep 7, 2025
68 of 71 checks passed
@btea btea deleted the perf/replace-startsWith-with-strict-equality branch September 7, 2025 05:49
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 7, 2025

This PR has been released as part of rollup@4.50.1. 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