preactjs / preact

⚛ī¸ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
https://preactjs.com
MIT License
36.35k stars 1.93k forks source link

major(core): use set for attribute props #4394

Closed JoviDeCroock closed 1 week ago

JoviDeCroock commented 1 month ago

This tests the performance difference of using a set here

github-actions[bot] commented 1 month ago

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +1% (-4.91ms - +4.95ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -2% - +1% (-0.34ms - +0.25ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +2% (-1.79ms - +1.81ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -4% - +3% (-0.70ms - +0.52ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +2% (-0.70ms - +1.58ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +4% (-0.10ms - +0.09ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +3% (-0.27ms - +0.95ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -3% - +4% (-0.87ms - +1.25ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.01ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +4% (-0.13ms - +0.54ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - -0% (-0.00ms - -0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +1% (-0.01ms - +0.04ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -0% - -0% (-0.00ms - -0.00ms)
    preact-local vs preact-main

Results

create10k
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1512
  • Commit: f41ccd5

duration

VersionAvg timevs preact-localvs preact-main
preact-local896.60ms - 901.96ms-unsure 🔍
-1% - +1%
-4.91ms - +4.95ms
preact-main895.12ms - 903.40msunsure 🔍
-1% - +1%
-4.95ms - +4.91ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local27.30ms - 27.31ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main27.30ms - 27.31msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
filter-list
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1512
  • Commit: f41ccd5

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.69ms - 17.00ms-unsure 🔍
-2% - +1%
-0.34ms - +0.25ms
preact-main16.64ms - 17.14msunsure 🔍
-2% - +2%
-0.25ms - +0.34ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.76ms - 1.77ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
preact-main1.76ms - 1.77msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-
hydrate1k
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1512
  • Commit: f41ccd5

duration

VersionAvg timevs preact-localvs preact-main
preact-local72.79ms - 75.83ms-unsure 🔍
-2% - +2%
-1.79ms - +1.81ms
preact-main73.33ms - 75.27msunsure 🔍
-2% - +2%
-1.81ms - +1.79ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local14.34ms - 14.88ms-unsure 🔍
-1% - +4%
-0.13ms - +0.54ms
preact-main14.21ms - 14.61msunsure 🔍
-4% - +1%
-0.54ms - +0.13ms
-
many-updates
  • Browser: chrome-headless
  • Sample size: 60
  • Built by: Benchmarks #1512
  • Commit: f41ccd5

duration

VersionAvg timevs preact-localvs preact-main
preact-local15.95ms - 16.68ms-unsure 🔍
-4% - +3%
-0.70ms - +0.52ms
preact-main15.92ms - 16.89msunsure 🔍
-3% - +4%
-0.52ms - +0.70ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.94ms - 4.94ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
preact-main4.94ms - 4.94msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: Benchmarks #1512
  • Commit: f41ccd5

duration

VersionAvg timevs preact-localvs preact-main
preact-local71.23ms - 72.94ms-unsure 🔍
-1% - +2%
-0.70ms - +1.58ms
preact-main70.89ms - 72.40msunsure 🔍
-2% - +1%
-1.58ms - +0.70ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.80ms - 3.83ms-unsure 🔍
-0% - +1%
-0.01ms - +0.04ms
preact-main3.78ms - 3.81msunsure 🔍
-1% - +0%
-0.04ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local30.08ms - 30.74ms-unsure 🔍
-2% - +1%
-0.59ms - +0.42ms
preact-main30.11ms - 30.88msunsure 🔍
-1% - +2%
-0.42ms - +0.59ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local35.47ms - 37.15ms-unsure 🔍
-4% - +3%
-1.36ms - +1.15ms
preact-main35.49ms - 37.35msunsure 🔍
-3% - +4%
-1.15ms - +1.36ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local27.36ms - 27.96ms-unsure 🔍
-2% - +2%
-0.57ms - +0.46ms
preact-main27.30ms - 28.14msunsure 🔍
-2% - +2%
-0.46ms - +0.57ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local25.23ms - 26.34ms-unsure 🔍
-4% - +2%
-0.99ms - +0.48ms
preact-main25.56ms - 26.52msunsure 🔍
-2% - +4%
-0.48ms - +0.99ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local27.11ms - 28.39ms-unsure 🔍
-5% - +2%
-1.35ms - +0.66ms
preact-main27.32ms - 28.87msunsure 🔍
-2% - +5%
-0.66ms - +1.35ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local24.50ms - 25.58ms-unsure 🔍
-3% - +3%
-0.73ms - +0.75ms
preact-main24.53ms - 25.54msunsure 🔍
-3% - +3%
-0.75ms - +0.73ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 60
  • Built by: Benchmarks #1512
  • Commit: f41ccd5

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.98ms - 2.13ms-unsure 🔍
-5% - +4%
-0.10ms - +0.09ms
preact-main2.00ms - 2.12msunsure 🔍
-4% - +5%
-0.09ms - +0.10ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.98ms - 0.98ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main0.98ms - 0.98msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
todo
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1512
  • Commit: f41ccd5

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.52ms - 30.70ms-unsure 🔍
-1% - +3%
-0.27ms - +0.95ms
preact-main29.61ms - 29.93msunsure 🔍
-3% - +1%
-0.95ms - +0.27ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.25ms - 1.25ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.25ms - 1.25msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
update10th1k
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1512
  • Commit: f41ccd5

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.11ms - 35.02ms-unsure 🔍
-3% - +4%
-0.87ms - +1.25ms
preact-main33.41ms - 34.34msunsure 🔍
-4% - +3%
-1.25ms - +0.87ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.74ms - 3.74ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
preact-main3.74ms - 3.74msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-

tachometer-reporter-action v2 for Benchmarks

github-actions[bot] commented 1 month ago

Size Change: +90 B (+0.15%)

Total Size: 61.6 kB

Filename Size Change
dist/preact.js 4.66 kB +15 B (+0.32%)
dist/preact.min.js 4.69 kB +16 B (+0.34%)
dist/preact.min.module.js 4.69 kB +13 B (+0.28%)
dist/preact.min.umd.js 4.72 kB +12 B (+0.26%)
dist/preact.module.js 4.68 kB +18 B (+0.39%)
dist/preact.umd.js 4.74 kB +16 B (+0.34%)
ℹī¸ View Unchanged | Filename | Size | | :--- | :---: | | `compat/dist/compat.js` | 4.09 kB | | `compat/dist/compat.module.js` | 4.01 kB | | `compat/dist/compat.umd.js` | 4.14 kB | | `debug/dist/debug.js` | 3.71 kB | | `debug/dist/debug.module.js` | 3.71 kB | | `debug/dist/debug.umd.js` | 3.79 kB | | `devtools/dist/devtools.js` | 231 B | | `devtools/dist/devtools.module.js` | 240 B | | `devtools/dist/devtools.umd.js` | 314 B | | `hooks/dist/hooks.js` | 1.55 kB | | `hooks/dist/hooks.module.js` | 1.59 kB | | `hooks/dist/hooks.umd.js` | 1.63 kB | | `jsx-runtime/dist/jsxRuntime.js` | 976 B | | `jsx-runtime/dist/jsxRuntime.module.js` | 949 B | | `jsx-runtime/dist/jsxRuntime.umd.js` | 1.06 kB | | `test-utils/dist/testUtils.js` | 453 B | | `test-utils/dist/testUtils.module.js` | 454 B | | `test-utils/dist/testUtils.umd.js` | 536 B |

compressed-size-action

coveralls commented 1 month ago

Coverage Status

coverage: 99.61%. remained the same when pulling f41ccd515e8bbc35b794a565135f2a580a11e3ec on major-use-set into b7c43d9b52f2809ab43ee34aea829ecffd935f89 on main.