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

refactor: Swap attribute prop conditional(s) for regex #4399

Closed rschristian closed 1 month ago

rschristian commented 1 month ago

Quick test to see if this isn't a perf regression

github-actions[bot] commented 1 month ago

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +2% (-1.67ms - +14.52ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -3% - +2% (-0.54ms - +0.39ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -3% - +0% (-2.32ms - +0.18ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +5% (-0.08ms - +0.82ms)
    preact-local vs preact-main
  • replace1k: slower ❌ 0% - 3% (0.05ms - 2.07ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +0% (-0.10ms - +0.01ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +0% (-0.33ms - +0.09ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -2% - +3% (-0.64ms - +1.03ms)
    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.00ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -3% - +1% (-0.50ms - +0.16ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +1% (-0.00ms - +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 #1518
  • Commit: 3af074b

duration

VersionAvg timevs preact-localvs preact-main
preact-local886.71ms - 900.58ms-unsure 🔍
-0% - +2%
-1.67ms - +14.52ms
preact-main883.04ms - 891.40msunsure 🔍
-2% - +0%
-14.52ms - +1.67ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local26.89ms - 26.91ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main26.90ms - 26.91msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
filter-list
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1518
  • Commit: 3af074b

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.62ms - 16.96ms-unsure 🔍
-3% - +2%
-0.54ms - +0.39ms
preact-main16.43ms - 17.29msunsure 🔍
-2% - +3%
-0.39ms - +0.54ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.72ms - 1.72ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.72ms - 1.72msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k
  • Browser: chrome-headless
  • Sample size: 60
  • Built by: Benchmarks #1518
  • Commit: 3af074b

duration

VersionAvg timevs preact-localvs preact-main
preact-local76.31ms - 77.36ms-unsure 🔍
-3% - +0%
-2.32ms - +0.18ms
preact-main76.78ms - 79.05msunsure 🔍
-0% - +3%
-0.18ms - +2.32ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local14.11ms - 14.54ms-unsure 🔍
-3% - +1%
-0.50ms - +0.16ms
preact-main14.24ms - 14.75msunsure 🔍
-1% - +4%
-0.16ms - +0.50ms
-
many-updates
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: Benchmarks #1518
  • Commit: 3af074b

duration

VersionAvg timevs preact-localvs preact-main
preact-local15.12ms - 15.91ms-unsure 🔍
-1% - +5%
-0.08ms - +0.82ms
preact-main14.92ms - 15.36msunsure 🔍
-5% - +0%
-0.82ms - +0.08ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.94ms - 4.95ms-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 #1518
  • Commit: 3af074b

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.65ms - 70.27ms-slower ❌
0% - 3%
0.05ms - 2.07ms
preact-main67.80ms - 68.99msfaster ✔
0% - 3%
0.05ms - 2.07ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.69ms - 3.71ms-unsure 🔍
-0% - +1%
-0.00ms - +0.04ms
preact-main3.67ms - 3.70msunsure 🔍
-1% - +0%
-0.04ms - +0.00ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local29.26ms - 29.75ms-unsure 🔍
-1% - +2%
-0.17ms - +0.59ms
preact-main29.01ms - 29.58msunsure 🔍
-2% - +1%
-0.59ms - +0.17ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local33.42ms - 35.30ms-unsure 🔍
-5% - +3%
-1.72ms - +0.90ms
preact-main33.86ms - 35.68msunsure 🔍
-3% - +5%
-0.90ms - +1.72ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local26.23ms - 26.76ms-unsure 🔍
-0% - +3%
-0.09ms - +0.66ms
preact-main25.95ms - 26.47msunsure 🔍
-2% - +0%
-0.66ms - +0.09ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local24.69ms - 25.42ms-unsure 🔍
-0% - +4%
-0.01ms - +0.96ms
preact-main24.25ms - 24.91msunsure 🔍
-4% - +0%
-0.96ms - +0.01ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local27.01ms - 28.62ms-unsure 🔍
-6% - +1%
-1.85ms - +0.37ms
preact-main27.80ms - 29.31msunsure 🔍
-1% - +7%
-0.37ms - +1.85ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local23.50ms - 24.51ms-unsure 🔍
-0% - +6%
-0.02ms - +1.32ms
preact-main22.91ms - 23.80msunsure 🔍
-5% - +0%
-1.32ms - +0.02ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 240
  • Built by: Benchmarks #1518
  • Commit: 3af074b

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.99ms - 2.06ms-unsure 🔍
-5% - +0%
-0.10ms - +0.01ms
preact-main2.03ms - 2.11msunsure 🔍
-1% - +5%
-0.01ms - +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 #1518
  • Commit: 3af074b

duration

VersionAvg timevs preact-localvs preact-main
preact-local28.57ms - 28.81ms-unsure 🔍
-1% - +0%
-0.33ms - +0.09ms
preact-main28.64ms - 28.98msunsure 🔍
-0% - +1%
-0.09ms - +0.33ms
-

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 #1518
  • Commit: 3af074b

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.78ms - 30.75ms-unsure 🔍
-2% - +3%
-0.64ms - +1.03ms
preact-main29.39ms - 30.75msunsure 🔍
-3% - +2%
-1.03ms - +0.64ms
-

usedJSHeapSize

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

tachometer-reporter-action v2 for Benchmarks

github-actions[bot] commented 1 month ago

Size Change: -57 B (-0.09%)

Total Size: 61.6 kB

Filename Size Change
dist/preact.js 4.66 kB -8 B (-0.17%)
dist/preact.min.js 4.69 kB -10 B (-0.21%)
dist/preact.min.module.js 4.68 kB -10 B (-0.21%)
dist/preact.min.umd.js 4.71 kB -11 B (-0.23%)
dist/preact.module.js 4.67 kB -9 B (-0.19%)
dist/preact.umd.js 4.73 kB -9 B (-0.19%)
ℹī¸ 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.611%. remained the same when pulling 3af074b92084346c785273f1e12148619979c711 on refactor/attr-prop-regex into 4ddd8fcb91615a69a6fdbfa385a7cbbb698c42ab on main.