Skip to content

refactor (v11): Improve accuracy of non-dimensional regex #4772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v11-2
Choose a base branch
from

Conversation

rschristian
Copy link
Member

@rschristian rschristian commented May 27, 2025

Copy of #2608

Uncommented the failing cases and added a few extra that were listed in #2607 but didn't make it into our test files. It's certainly a bit bigger and likely a bit slower but thought I'd at least put this up as a suggestion as I happened to remember it.

Copy link

github-actions bot commented May 27, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +1% (-2.58ms - +6.19ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.03ms - +0.03ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +2% (-1.12ms - +1.61ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -4% - +2% (-0.72ms - +0.32ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +2% (-0.46ms - +1.53ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +2% (-0.10ms - +0.05ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.47ms - +0.43ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -5% - +2% (-1.46ms - +0.53ms)
    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 🔍 -6% - +2% (-0.46ms - +0.20ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -0% - +4% (-0.01ms - +0.05ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.01ms - +0.01ms)
    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-local979.77ms - 985.97ms-unsure 🔍
-0% - +1%
-2.58ms - +6.19ms
preact-main977.96ms - 984.17msunsure 🔍
-1% - +0%
-6.19ms - +2.58ms
-

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.55ms - 16.59ms-unsure 🔍
-0% - +0%
-0.03ms - +0.03ms
preact-main16.55ms - 16.59msunsure 🔍
-0% - +0%
-0.03ms - +0.03ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.96ms - 70.76ms-unsure 🔍
-2% - +2%
-1.12ms - +1.61ms
preact-main68.60ms - 70.64msunsure 🔍
-2% - +2%
-1.61ms - +1.12ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local7.40ms - 7.91ms-unsure 🔍
-6% - +2%
-0.46ms - +0.20ms
preact-main7.58ms - 7.99msunsure 🔍
-3% - +6%
-0.20ms - +0.46ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.16ms - 16.86ms-unsure 🔍
-4% - +2%
-0.72ms - +0.32ms
preact-main16.33ms - 17.09msunsure 🔍
-2% - +4%
-0.32ms - +0.72ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.78ms - 3.78ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-main3.77ms - 3.78msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4710
  • Commit: 121b0a8

duration

VersionAvg timevs preact-localvs preact-main
preact-local64.43ms - 65.87ms-unsure 🔍
-1% - +2%
-0.46ms - +1.53ms
preact-main63.92ms - 65.30msunsure 🔍
-2% - +1%
-1.53ms - +0.46ms
-

usedJSHeapSize

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

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local25.97ms - 26.67ms-unsure 🔍
-2% - +2%
-0.62ms - +0.43ms
preact-main26.02ms - 26.81msunsure 🔍
-2% - +2%
-0.43ms - +0.62ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local32.65ms - 34.05ms-unsure 🔍
-2% - +3%
-0.80ms - +1.06ms
preact-main32.61ms - 33.84msunsure 🔍
-3% - +2%
-1.06ms - +0.80ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local28.89ms - 29.87ms-unsure 🔍
-3% - +2%
-0.88ms - +0.53ms
preact-main29.05ms - 30.05msunsure 🔍
-2% - +3%
-0.53ms - +0.88ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local26.62ms - 27.58ms-unsure 🔍
-4% - +2%
-0.99ms - +0.45ms
preact-main26.84ms - 27.90msunsure 🔍
-2% - +4%
-0.45ms - +0.99ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local22.06ms - 23.19ms-unsure 🔍
-5% - +3%
-1.06ms - +0.59ms
preact-main22.26ms - 23.46msunsure 🔍
-3% - +5%
-0.59ms - +1.06ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local21.42ms - 22.41ms-unsure 🔍
-1% - +5%
-0.15ms - +1.12ms
preact-main21.03ms - 21.83msunsure 🔍
-5% - +1%
-1.12ms - +0.15ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 180
  • Built by: CI #4710
  • Commit: 121b0a8

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.10ms - 2.20ms-unsure 🔍
-5% - +2%
-0.10ms - +0.05ms
preact-main2.12ms - 2.24msunsure 🔍
-2% - +5%
-0.05ms - +0.10ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.16ms - 1.20ms-unsure 🔍
-0% - +4%
-0.01ms - +0.05ms
preact-main1.14ms - 1.18msunsure 🔍
-4% - +0%
-0.05ms - +0.01ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local32.15ms - 32.81ms-unsure 🔍
-1% - +1%
-0.47ms - +0.43ms
preact-main32.19ms - 32.81msunsure 🔍
-1% - +1%
-0.43ms - +0.47ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.23ms - 1.25ms-unsure 🔍
-1% - +1%
-0.01ms - +0.01ms
preact-main1.23ms - 1.25msunsure 🔍
-1% - +1%
-0.01ms - +0.01ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.78ms - 31.00ms-unsure 🔍
-5% - +2%
-1.46ms - +0.53ms
preact-main30.07ms - 31.65msunsure 🔍
-2% - +5%
-0.53ms - +1.46ms
-

usedJSHeapSize

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

tachometer-reporter-action v2 for CI

Copy link

Size Change: +138 B (+0.3%)

Total Size: 46.6 kB

Filename Size Change
compat/dist/compat.js 3.78 kB +47 B (+1.26%)
compat/dist/compat.mjs 3.69 kB +47 B (+1.29%)
compat/dist/compat.umd.js 3.83 kB +44 B (+1.16%)
ℹ️ View Unchanged
Filename Size
debug/dist/debug.js 3.85 kB
debug/dist/debug.mjs 3.85 kB
debug/dist/debug.umd.js 3.94 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 271 B
devtools/dist/devtools.umd.js 346 B
dist/preact.js 4.62 kB
dist/preact.mjs 4.63 kB
dist/preact.umd.js 4.69 kB
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 861 B
jsx-runtime/dist/jsxRuntime.mjs 830 B
jsx-runtime/dist/jsxRuntime.umd.js 934 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

@rschristian rschristian changed the title chore: Port more correct non-dimensional regex to v11 refactor (v11): Improve accuracy of non-dimensional regex May 28, 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.

1 participant