Skip to content

feat: optimise jsx runtime#4337

Merged
JoviDeCroock merged 5 commits intomainfrom
optimise-jsx-runtime
Apr 17, 2024
Merged

feat: optimise jsx runtime#4337
JoviDeCroock merged 5 commits intomainfrom
optimise-jsx-runtime

Conversation

@JoviDeCroock
Copy link
Copy Markdown
Member

Similar to React in v19 we can avoid cloning props

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +2% (-2.37ms - +16.75ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +0% (-0.17ms - +0.05ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -3% - +1% (-2.48ms - +0.56ms)
    preact-local vs preact-main
  • many-updates: faster ✔ 0% - 3% (0.01ms - 0.57ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -3% - +1% (-1.79ms - +0.90ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +1% (-0.08ms - +0.02ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +4% (-0.29ms - +1.15ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -3% - +4% (-1.14ms - +1.22ms)
    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 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +0% (-0.01ms - +0.00ms)
    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.01ms - +0.01ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local891.98ms - 910.28ms-unsure 🔍
-0% - +2%
-2.37ms - +16.75ms
preact-main891.17ms - 896.70msunsure 🔍
-2% - +0%
-16.75ms - +2.37ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local26.79ms - 26.79ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main26.79ms - 26.79msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.57ms - 16.61ms-unsure 🔍
-1% - +0%
-0.17ms - +0.05ms
preact-main16.55ms - 16.76msunsure 🔍
-0% - +1%
-0.05ms - +0.17ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local72.44ms - 73.29ms-unsure 🔍
-3% - +1%
-2.48ms - +0.56ms
preact-main72.36ms - 75.28msunsure 🔍
-1% - +3%
-0.56ms - +2.48ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local6.47ms - 6.48ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-main6.47ms - 6.47msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.45ms - 16.67ms-faster ✔
0% - 3%
0.01ms - 0.57ms
preact-main16.59ms - 17.11msslower ❌
0% - 3%
0.01ms - 0.57ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.74ms - 4.74ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main4.74ms - 4.74msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local69.21ms - 70.84ms-unsure 🔍
-3% - +1%
-1.79ms - +0.90ms
preact-main69.40ms - 71.54msunsure 🔍
-1% - +3%
-0.90ms - +1.79ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.66ms - 3.67ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
preact-main3.66ms - 3.67msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local28.05ms - 29.12ms-unsure 🔍
-2% - +2%
-0.55ms - +0.71ms
preact-main28.18ms - 28.83msunsure 🔍
-2% - +2%
-0.71ms - +0.55ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local36.67ms - 38.56ms-unsure 🔍
-3% - +4%
-1.23ms - +1.42ms
preact-main36.59ms - 38.45msunsure 🔍
-4% - +3%
-1.42ms - +1.23ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.54ms - 25.92ms-unsure 🔍
-4% - -0%
-1.02ms - +0.01ms
preact-main25.76ms - 26.72msunsure 🔍
-0% - +4%
-0.01ms - +1.02ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local23.92ms - 24.76ms-unsure 🔍
-4% - +1%
-0.96ms - +0.33ms
preact-main24.17ms - 25.14msunsure 🔍
-1% - +4%
-0.33ms - +0.96ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local30.07ms - 31.81ms-slower ❌
1% - 9%
0.23ms - 2.75ms
preact-main28.53ms - 30.37msfaster ✔
1% - 9%
0.23ms - 2.75ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local22.07ms - 22.75ms-unsure 🔍
-3% - +1%
-0.72ms - +0.31ms
preact-main22.22ms - 23.01msunsure 🔍
-1% - +3%
-0.31ms - +0.72ms
-
text-update

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.73ms - 1.80ms-unsure 🔍
-4% - +1%
-0.08ms - +0.02ms
preact-main1.75ms - 1.83msunsure 🔍
-1% - +5%
-0.02ms - +0.08ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.01ms - 1.01ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.01ms - 1.01msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local27.51ms - 28.92ms-unsure 🔍
-1% - +4%
-0.29ms - +1.15ms
preact-main27.65ms - 27.93msunsure 🔍
-4% - +1%
-1.15ms - +0.29ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.13ms - 1.13ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.13ms - 1.13msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local31.83ms - 33.55ms-unsure 🔍
-3% - +4%
-1.14ms - +1.22ms
preact-main31.83ms - 33.46msunsure 🔍
-4% - +3%
-1.22ms - +1.14ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.59ms - 3.60ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main3.59ms - 3.60msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2024

Size Change: +39 B (0%)

Total Size: 60.3 kB

Filename Size Change
jsx-runtime/dist/jsxRuntime.js 976 B +13 B (1%)
jsx-runtime/dist/jsxRuntime.module.js 949 B +11 B (1%)
jsx-runtime/dist/jsxRuntime.umd.js 1.06 kB +15 B (1%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 4.05 kB 0 B
compat/dist/compat.module.js 3.98 kB 0 B
compat/dist/compat.umd.js 4.11 kB 0 B
debug/dist/debug.js 3.52 kB 0 B
debug/dist/debug.module.js 3.52 kB 0 B
debug/dist/debug.umd.js 3.6 kB 0 B
devtools/dist/devtools.js 230 B 0 B
devtools/dist/devtools.module.js 239 B 0 B
devtools/dist/devtools.umd.js 314 B 0 B
dist/preact.js 4.56 kB 0 B
dist/preact.min.js 4.6 kB 0 B
dist/preact.min.module.js 4.59 kB 0 B
dist/preact.min.umd.js 4.62 kB 0 B
dist/preact.module.js 4.58 kB 0 B
dist/preact.umd.js 4.63 kB 0 B
hooks/dist/hooks.js 1.55 kB 0 B
hooks/dist/hooks.module.js 1.59 kB 0 B
hooks/dist/hooks.umd.js 1.63 kB 0 B
test-utils/dist/testUtils.js 453 B 0 B
test-utils/dist/testUtils.module.js 454 B 0 B
test-utils/dist/testUtils.umd.js 536 B 0 B

compressed-size-action

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 11, 2024

Coverage Status

coverage: 99.602% (+0.001%) from 99.601%
when pulling 7cf88e5 on optimise-jsx-runtime
into 8c88f52 on main.

@JoviDeCroock JoviDeCroock force-pushed the optimise-jsx-runtime branch from 4cdc45a to 4f085f1 Compare April 11, 2024 09:06
Comment thread jsx-runtime/src/index.js Outdated
JoviDeCroock and others added 2 commits April 17, 2024 16:27
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
@JoviDeCroock JoviDeCroock merged commit f3edc90 into main Apr 17, 2024
@JoviDeCroock JoviDeCroock deleted the optimise-jsx-runtime branch April 17, 2024 14:50
@JoviDeCroock JoviDeCroock mentioned this pull request Apr 29, 2024
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.

3 participants