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
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
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

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
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
Contributor Author

quantizor commented Nov 2, 2025 via email

@dcastil
Copy link
Owner

dcastil commented Nov 2, 2025

Alright, let me remove it

@dcastil
Copy link
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

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
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