Skip to content

Conversation

@rschristian
Copy link
Member

Noticed we were calling .toLowerCase() and then .slice(2), which, conceptually & (somewhat) measurably, should be less than optimal. Then may as well call .slice() early, doesn't hinder our casing check & reduces some bytes.

@github-actions
Copy link

github-actions bot commented Jul 15, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +0% (-4.78ms - +2.10ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +3% (-0.17ms - +0.54ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +3% (-0.98ms - +1.86ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.03ms - +0.06ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -2% - +1% (-1.22ms - +0.82ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +4% (-0.09ms - +0.08ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +0% (-0.46ms - +0.08ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -5% - +1% (-1.45ms - +0.23ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -10% - +2% (-0.89ms - +0.17ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +2% (-0.04ms - +0.02ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -0% - +0% (-0.01ms - +0.00ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local953.16ms - 957.74ms-unsure 🔍
-0% - +0%
-4.78ms - +2.10ms
preact-main954.21ms - 959.36msunsure 🔍
-0% - +1%
-2.10ms - +4.78ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local19.18ms - 19.18ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main19.18ms - 19.18msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.31ms - 17.03ms-unsure 🔍
-1% - +3%
-0.17ms - +0.54ms
preact-main16.46ms - 16.52msunsure 🔍
-3% - +1%
-0.54ms - +0.17ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.54ms - 1.54ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.54ms - 1.54msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local71.21ms - 73.32ms-unsure 🔍
-1% - +3%
-0.98ms - +1.86ms
preact-main70.87ms - 72.77msunsure 🔍
-3% - +1%
-1.86ms - +0.98ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local8.42ms - 9.20ms-unsure 🔍
-10% - +2%
-0.89ms - +0.17ms
preact-main8.81ms - 9.53msunsure 🔍
-2% - +10%
-0.17ms - +0.89ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.55ms - 16.58ms-unsure 🔍
-0% - +0%
-0.03ms - +0.06ms
preact-main16.50ms - 16.59msunsure 🔍
-0% - +0%
-0.06ms - +0.03ms
-

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
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4893
  • Commit: c23f984

duration

VersionAvg timevs preact-localvs preact-main
preact-local63.01ms - 64.42ms-unsure 🔍
-2% - +1%
-1.22ms - +0.82ms
preact-main63.18ms - 64.65msunsure 🔍
-1% - +2%
-0.82ms - +1.22ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.98ms - 2.99ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main2.98ms - 2.99msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local25.20ms - 25.78ms-unsure 🔍
-3% - +0%
-0.77ms - +0.13ms
preact-main25.46ms - 26.15msunsure 🔍
-1% - +3%
-0.13ms - +0.77ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local33.48ms - 34.66ms-unsure 🔍
-2% - +3%
-0.57ms - +1.10ms
preact-main33.21ms - 34.40msunsure 🔍
-3% - +2%
-1.10ms - +0.57ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local29.47ms - 30.48ms-unsure 🔍
-2% - +2%
-0.64ms - +0.72ms
preact-main29.48ms - 30.39msunsure 🔍
-2% - +2%
-0.72ms - +0.64ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local27.24ms - 28.09ms-unsure 🔍
-2% - +2%
-0.66ms - +0.59ms
preact-main27.25ms - 28.15msunsure 🔍
-2% - +2%
-0.59ms - +0.66ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local23.63ms - 24.74ms-unsure 🔍
-0% - +6%
-0.10ms - +1.39ms
preact-main23.05ms - 24.03msunsure 🔍
-6% - +0%
-1.39ms - +0.10ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local21.52ms - 22.25ms-unsure 🔍
-4% - +2%
-0.80ms - +0.35ms
preact-main21.67ms - 22.55msunsure 🔍
-2% - +4%
-0.35ms - +0.80ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 170
  • Built by: CI #4893
  • Commit: c23f984

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.84ms - 1.99ms-unsure 🔍
-5% - +4%
-0.09ms - +0.08ms
preact-main1.87ms - 1.97msunsure 🔍
-4% - +5%
-0.08ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.98ms - 1.02ms-unsure 🔍
-4% - +2%
-0.04ms - +0.02ms
preact-main0.99ms - 1.04msunsure 🔍
-2% - +4%
-0.02ms - +0.04ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local32.62ms - 32.87ms-unsure 🔍
-1% - +0%
-0.46ms - +0.08ms
preact-main32.70ms - 33.17msunsure 🔍
-0% - +1%
-0.08ms - +0.46ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.24ms - 1.24ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.24ms - 1.24msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
update10th1k
  • Browser: chrome-headless
  • Sample size: 110
  • Built by: CI #4893
  • Commit: c23f984

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.39ms - 30.39ms-unsure 🔍
-5% - +1%
-1.45ms - +0.23ms
preact-main29.83ms - 31.17msunsure 🔍
-1% - +5%
-0.23ms - +1.45ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.94ms - 2.95ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
preact-main2.94ms - 2.95msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-

tachometer-reporter-action v2 for CI

@github-actions
Copy link

github-actions bot commented Jul 15, 2025

Size Change: -8 B (-0.02%)

Total Size: 47.2 kB

Filename Size Change
dist/preact.js 4.6 kB -2 B (-0.04%)
dist/preact.mjs 4.61 kB -4 B (-0.09%)
dist/preact.umd.js 4.67 kB -2 B (-0.04%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 3.92 kB
compat/dist/compat.mjs 3.84 kB
compat/dist/compat.umd.js 3.98 kB
debug/dist/debug.js 3.88 kB
debug/dist/debug.mjs 3.89 kB
debug/dist/debug.umd.js 3.97 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 271 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.55 kB
hooks/dist/hooks.mjs 1.58 kB
hooks/dist/hooks.umd.js 1.62 kB
jsx-runtime/dist/jsxRuntime.js 892 B
jsx-runtime/dist/jsxRuntime.mjs 861 B
jsx-runtime/dist/jsxRuntime.umd.js 966 B
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 473 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@coveralls
Copy link

coveralls commented Jul 15, 2025

Coverage Status

coverage: 99.539%. remained the same
when pulling c23f984 on refactor/slice-then-lowercase-events
into 61a257f on main.

@rschristian rschristian force-pushed the refactor/slice-then-lowercase-events branch from 27792d7 to c23f984 Compare July 15, 2025 06:25
@rschristian rschristian force-pushed the refactor/slice-then-lowercase-events branch from 1a2b479 to c23f984 Compare July 15, 2025 06:59
@rschristian rschristian merged commit 3675a09 into main Jul 15, 2025
37 checks passed
@rschristian rschristian deleted the refactor/slice-then-lowercase-events branch July 15, 2025 07:05
@JoviDeCroock JoviDeCroock mentioned this pull request Aug 19, 2025
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.

4 participants