Skip to content

Improve benchmarking suite#620

Merged
dcastil merged 7 commits intodcastil:mainfrom
quantizor:improve-benchmarking-suite
Nov 2, 2025
Merged

Improve benchmarking suite#620
dcastil merged 7 commits intodcastil:mainfrom
quantizor:improve-benchmarking-suite

Conversation

@quantizor
Copy link
Copy Markdown
Contributor

@quantizor quantizor commented Oct 29, 2025

Now with memory info:

Memory Usage Summary:
  init: 1.57 MB heap
  simple: 1016.39 KB heap
  heavy: 1.01 MB heap
  collection with cache: 2.52 MB heap
    Total footprint: 234.75 MB
    Operations: 1322
  collection without cache: 16.99 MB heap
    Total footprint: 235.13 MB
    Operations: 1322


 ✓ tests/tw-merge.benchmark.ts > twMerge 3136ms
     name                            hz     min      max    mean     p75      p99     p995     p999     rme  samples
   · init                      4,065.35  0.2175   1.8490  0.2460  0.2450   0.4969   0.5517   0.8136  ±1.12%     2033
   · simple                    4,062.11  0.2270   0.7383  0.2462  0.2448   0.4628   0.4756   0.5714  ±0.70%     2032
   · heavy                     3,837.87  0.2374   2.3023  0.2606  0.2597   0.4791   0.5047   0.8659  ±1.06%     1919
   · collection with cache       688.97  1.3773   2.2432  1.4514  1.4654   1.7979   1.9276   2.2432  ±0.68%      345
   · collection without cache    109.09  8.8340  10.2709  9.1664  9.2940  10.2709  10.2709  10.2709  ±0.73%       55

The benchmark data should be a bit more accurate as well with some random memory fluctuations removed.

@github-actions github-actions bot added the context-v3 Related to tailwind-merge v3 label Oct 29, 2025
This was referenced Oct 29, 2025
@quantizor
Copy link
Copy Markdown
Contributor Author

quantizor commented Oct 29, 2025

Need some more tweaks here, the gc method is not being properly exposed so we're missing the per-test stabilization done

@quantizor quantizor force-pushed the improve-benchmarking-suite branch from cb89075 to 0e054cc Compare October 29, 2025 20:54
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Nov 2, 2025

CodSpeed Performance Report

Merging #620 will not alter performance

Comparing quantizor:improve-benchmarking-suite (13c02a6) with main (660b993)

Summary

✅ 5 untouched

Copy link
Copy Markdown
Owner

@dcastil dcastil left a comment

Choose a reason for hiding this comment

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

Nice, this is really cool! Thanks for the addition! Let's just fix the last ESLint issue so we can merge this.

@quantizor
Copy link
Copy Markdown
Contributor Author

quantizor commented Nov 2, 2025 via email

@dcastil
Copy link
Copy Markdown
Owner

dcastil commented Nov 2, 2025

Alright, let me remove it

@dcastil
Copy link
Copy Markdown
Owner

dcastil commented Nov 2, 2025

FYI I also added two commits:

  • Removed variable benchWithMemory which didn't seem to be used in 7848c8b
  • Moved all the helper code below the test suite to stay consistent with rest of codebase in 13c02a6

@dcastil dcastil merged commit 57372fa into dcastil:main Nov 2, 2025
5 checks passed
@dcastil dcastil added the other Is other label Nov 2, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 9, 2025

This was addressed in release v3.4.0.

Repository owner deleted a comment from github-actions bot Feb 15, 2026
alessio added a commit to layer-3/nitrolite that referenced this pull request Mar 16, 2026
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)


<h3>Snyk has created this PR to upgrade tailwind-merge from 3.4.0 to
3.4.1.</h3>

:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.

<hr/>


- The recommended version is **7 versions** ahead of your current
version.

- The recommended version was released **22 days ago**.



<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>tailwind-merge</b></summary>
    <ul>
      <li>
<b>3.4.1</b> - <a
href="https://redirect.github.com/dcastil/tailwind-merge/releases/tag/v3.4.1">2026-02-15</a></br><h3>Bug
Fixes</h3>
<ul>
<li>Prevent arbitrary font-family and font-weight from merging by <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/roneymoon/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/roneymoon">@ roneymoon</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="3859932231" data-permission-text="Title is private"
data-url="dcastil/tailwind-merge#635"
data-hovercard-type="pull_request"
data-hovercard-url="/dcastil/tailwind-merge/pull/635/hovercard"
href="https://redirect.github.com/dcastil/tailwind-merge/pull/635">#635</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a class="commit-link"
href="https://redirect.github.com/dcastil/tailwind-merge/compare/v3.4.0...v3.4.1"><tt>v3.4.0...v3.4.1</tt></a></p>
<p>Thanks to <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/brandonmcconnell/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/brandonmcconnell">@
brandonmcconnell</a>, <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/manavm1990/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/manavm1990">@ manavm1990</a>, <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/langy/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/langy">@ langy</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/roboflow/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/roboflow">@ roboflow</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/syntaxfm/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/syntaxfm">@ syntaxfm</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/getsentry/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/getsentry">@ getsentry</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/codecov/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/codecov">@ codecov</a>, a private
sponsor, <a class="user-mention notranslate"
data-hovercard-type="organization"
data-hovercard-url="/orgs/block/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/block">@ block</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/openclaw/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/openclaw">@ openclaw</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/sourcegraph/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/sourcegraph">@ sourcegraph</a> and
more via <a class="user-mention notranslate"
data-hovercard-type="organization"
data-hovercard-url="/orgs/thnxdev/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/thnxdev">@ thnxdev</a> for sponsoring
tailwind-merge! ❤️</p>
      </li>
      <li>
<b>3.4.1-dev.d2bbc293406dc65ef26eb2b0dc75ff69c765039b</b> - 2026-02-15
      </li>
      <li>
<b>3.4.1-dev.bb32e1c31b971ead8b49750a167b996eb0480649</b> - 2026-02-15
      </li>
      <li>
<b>3.4.1-dev.a363aa43401a35e2ebd26df401bfd286f854f6ec</b> - 2026-02-15
      </li>
      <li>
<b>3.4.1-dev.6c1f77ca717df7d2685eb783c568ef7696148171</b> - 2026-02-18
      </li>
      <li>
<b>3.4.1-dev.60634fdace8a9efd7af290e0382cefa81c00f8cf</b> - 2026-02-15
      </li>
      <li>
<b>3.4.1-dev.02b6eb6df78e6fb7994b43d4b5f4bbecbe05c43a</b> - 2026-02-15
      </li>
      <li>
<b>3.4.0</b> - <a
href="https://redirect.github.com/dcastil/tailwind-merge/releases/tag/v3.4.0">2025-11-09</a></br><h3>New
Features</h3>
<ul>
<li>Performance optimizations which make tailwind-merge &gt;10% faster
<ul>
<li>Vibe optimization by <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/quantizor/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/quantizor">@ quantizor</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2923243792" data-permission-text="Title is private"
data-url="dcastil/tailwind-merge#547"
data-hovercard-type="pull_request"
data-hovercard-url="/dcastil/tailwind-merge/pull/547/hovercard"
href="https://redirect.github.com/dcastil/tailwind-merge/pull/547">#547</a></li>
<li>Additional optimizations by <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/quantizor/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/quantizor">@ quantizor</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="3567413691" data-permission-text="Title is private"
data-url="dcastil/tailwind-merge#619"
data-hovercard-type="pull_request"
data-hovercard-url="/dcastil/tailwind-merge/pull/619/hovercard"
href="https://redirect.github.com/dcastil/tailwind-merge/pull/619">#619</a></li>
</ul>
</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Improve docs by clarifying things, adding more examples by <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/dcastil/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/dcastil">@ dcastil</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="3554414538" data-permission-text="Title is private"
data-url="dcastil/tailwind-merge#618"
data-hovercard-type="pull_request"
data-hovercard-url="/dcastil/tailwind-merge/pull/618/hovercard"
href="https://redirect.github.com/dcastil/tailwind-merge/pull/618">#618</a></li>
<li>Make examples more realistic by <a class="user-mention notranslate"
data-hovercard-type="user" data-hovercard-url="/users/dcastil/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/dcastil">@ dcastil</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="3554404528" data-permission-text="Title is private"
data-url="dcastil/tailwind-merge#617"
data-hovercard-type="pull_request"
data-hovercard-url="/dcastil/tailwind-merge/pull/617/hovercard"
href="https://redirect.github.com/dcastil/tailwind-merge/pull/617">#617</a></li>
<li>Add custom variant as an alternative to docs by <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/kidonng/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/kidonng">@ kidonng</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="3152183374" data-permission-text="Title is private"
data-url="dcastil/tailwind-merge#592"
data-hovercard-type="pull_request"
data-hovercard-url="/dcastil/tailwind-merge/pull/592/hovercard"
href="https://redirect.github.com/dcastil/tailwind-merge/pull/592">#592</a></li>
</ul>
<h3>Other</h3>
<ul>
<li>Improve benchmarking suite by <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/quantizor/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/quantizor">@ quantizor</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="3567535310" data-permission-text="Title is private"
data-url="dcastil/tailwind-merge#620"
data-hovercard-type="pull_request"
data-hovercard-url="/dcastil/tailwind-merge/pull/620/hovercard"
href="https://redirect.github.com/dcastil/tailwind-merge/pull/620">#620</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a class="commit-link"
href="https://redirect.github.com/dcastil/tailwind-merge/compare/v3.3.1...v3.4.0"><tt>v3.3.1...v3.4.0</tt></a></p>
<p>Thanks to <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/brandonmcconnell/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/brandonmcconnell">@
brandonmcconnell</a>, <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/manavm1990/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/manavm1990">@ manavm1990</a>, <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/langy/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/langy">@ langy</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/roboflow/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/roboflow">@ roboflow</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/syntaxfm/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/syntaxfm">@ syntaxfm</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/getsentry/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/getsentry">@ getsentry</a>, <a
class="user-mention notranslate" data-hovercard-type="organization"
data-hovercard-url="/orgs/codecov/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/codecov">@ codecov</a> and a private
sponsor for sponsoring tailwind-merge! ❤️</p>
      </li>
    </ul>
from <a
href="https://redirect.github.com/dcastil/tailwind-merge/releases">tailwind-merge
GitHub release notes</a>
  </details>
</details>

---

> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.

---

**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._

**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6ImZha2Uta2V5IiwiYW5vbnltb3VzSWQiOiI0ZjI5Y2Q1My05NDFlLTRlZTktOTY4OC0xMDgxMzYxMmY3OTQiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjRmMjljZDUzLTk0MWUtNGVlOS05Njg4LTEwODEzNjEyZjc5NCJ9fQ=="
width="0" height="0"/>

> - 🧐 [View latest project
report](https://app.eu.snyk.io/org/layer-3-foundation-default/project/6ec96c13-2fa1-4d2e-a2c9-55875479edaf?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.eu.snyk.io/org/layer-3-foundation-default/project/6ec96c13-2fa1-4d2e-a2c9-55875479edaf/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.eu.snyk.io/org/layer-3-foundation-default/project/6ec96c13-2fa1-4d2e-a2c9-55875479edaf/settings/integration?pkg&#x3D;tailwind-merge&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

[//]: #
'snyk:metadata:{"breakingChangeRiskLevel":null,"FF_showPullRequestBreakingChanges":false,"FF_showPullRequestBreakingChangesWebSearch":false,"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"tailwind-merge","from":"3.4.0","to":"3.4.1"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"4f29cd53-941e-4ee9-9688-10813612f794","prPublicId":"4f29cd53-941e-4ee9-9688-10813612f794","packageManager":"npm","priorityScoreList":[],"projectPublicId":"6ec96c13-2fa1-4d2e-a2c9-55875479edaf","projectUrl":"https://app.eu.snyk.io/org/layer-3-foundation-default/project/6ec96c13-2fa1-4d2e-a2c9-55875479edaf?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":7,"publishedDate":"2026-02-15T10:35:13.860Z"},"vulns":[]}'

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Alessio Treglia <229356+alessio@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

context-v3 Related to tailwind-merge v3 other Is other

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants