Skip to content
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

test performance of reducing prototype access #4414

Closed
wants to merge 1 commit into from
Closed

Conversation

JoviDeCroock
Copy link
Member

This tests whether we can give a minor performance boost with a size tradeoff by reducing prototype access, this currently breaks tests due to us not registering the calls anymore.

Copy link

github-actions bot commented Jun 19, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +2% (-8.20ms - +19.97ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -2% - +4% (-0.27ms - +0.70ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +3% (-1.90ms - +2.58ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -5% - +3% (-0.66ms - +0.38ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -2% - +2% (-1.64ms - +1.87ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +4% (-0.09ms - +0.10ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.18ms - +0.29ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -1% - +3% (-0.23ms - +0.79ms)
    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 🔍 -4% - +1% (-0.60ms - +0.09ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 +0% - +0% (+0.00ms - +0.01ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.03ms - +0.02ms)
    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

duration

VersionAvg timevs preact-localvs preact-main
preact-local884.08ms - 909.12ms-unsure 🔍
-1% - +2%
-8.20ms - +19.97ms
preact-main884.27ms - 897.17msunsure 🔍
-2% - +1%
-19.97ms - +8.20ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.54ms - 17.50ms-unsure 🔍
-2% - +4%
-0.27ms - +0.70ms
preact-main16.73ms - 16.87msunsure 🔍
-4% - +2%
-0.70ms - +0.27ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local76.79ms - 80.02ms-unsure 🔍
-2% - +3%
-1.90ms - +2.58ms
preact-main76.51ms - 79.61msunsure 🔍
-3% - +2%
-2.58ms - +1.90ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local14.03ms - 14.43ms-unsure 🔍
-4% - +1%
-0.60ms - +0.09ms
preact-main14.20ms - 14.76msunsure 🔍
-1% - +4%
-0.09ms - +0.60ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local13.64ms - 14.33ms-unsure 🔍
-5% - +3%
-0.66ms - +0.38ms
preact-main13.74ms - 14.51msunsure 🔍
-3% - +5%
-0.38ms - +0.66ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.95ms - 4.95ms-unsure 🔍
+0% - +0%
+0.00ms - +0.01ms
preact-main4.94ms - 4.95msunsure 🔍
-0% - -0%
-0.01ms - -0.00ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local76.12ms - 78.53ms-unsure 🔍
-2% - +2%
-1.64ms - +1.87ms
preact-main75.94ms - 78.48msunsure 🔍
-2% - +2%
-1.87ms - +1.64ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.53ms - 3.57ms-unsure 🔍
-1% - +1%
-0.03ms - +0.02ms
preact-main3.54ms - 3.57msunsure 🔍
-1% - +1%
-0.02ms - +0.03ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local29.59ms - 30.22ms-slower ❌
0% - 3%
0.09ms - 0.96ms
preact-main29.08ms - 29.68msfaster ✔
0% - 3%
0.09ms - 0.96ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local33.65ms - 35.56ms-unsure 🔍
-6% - +2%
-1.96ms - +0.75ms
preact-main34.24ms - 36.17msunsure 🔍
-2% - +6%
-0.75ms - +1.96ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.27ms - 25.70ms-unsure 🔍
-0% - +3%
-0.12ms - +0.73ms
preact-main24.81ms - 25.54msunsure 🔍
-3% - +0%
-0.73ms - +0.12ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local29.93ms - 31.47ms-unsure 🔍
-5% - +2%
-1.51ms - +0.62ms
preact-main30.40ms - 31.88msunsure 🔍
-2% - +5%
-0.62ms - +1.51ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local22.26ms - 23.67ms-unsure 🔍
-0% - +9%
+0.01ms - +1.88ms
preact-main21.40ms - 22.63msfaster ✔
0% - 8%
0.01ms - 1.88ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local23.08ms - 24.21ms-unsure 🔍
-3% - +4%
-0.64ms - +0.93ms
preact-main22.95ms - 24.05msunsure 🔍
-4% - +3%
-0.93ms - +0.64ms
-
text-update

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.17ms - 2.30ms-unsure 🔍
-4% - +4%
-0.09ms - +0.10ms
preact-main2.16ms - 2.30msunsure 🔍
-4% - +4%
-0.10ms - +0.09ms
-

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local27.53ms - 27.95ms-unsure 🔍
-1% - +1%
-0.18ms - +0.29ms
preact-main27.59ms - 27.79msunsure 🔍
-1% - +1%
-0.29ms - +0.18ms
-

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local30.70ms - 31.50ms-unsure 🔍
-1% - +3%
-0.23ms - +0.79ms
preact-main30.51ms - 31.13msunsure 🔍
-3% - +1%
-0.79ms - +0.23ms
-

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

@@ -12,6 +12,7 @@ import { slice } from './util';
* existing DOM tree rooted at `replaceNode`
*/
export function render(vnode, parentDom, replaceNode) {
setup();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be needed to avoid us reaching into globals while we renderToStream or renderToString

Copy link

github-actions bot commented Jun 19, 2024

Size Change: +289 B (+0.47%)

Total Size: 62.1 kB

Filename Size Change
dist/preact.js 4.73 kB +51 B (+1.09%)
dist/preact.min.js 4.75 kB +44 B (+0.93%)
dist/preact.min.module.js 4.75 kB +46 B (+0.98%)
dist/preact.min.umd.js 4.78 kB +44 B (+0.93%)
dist/preact.module.js 4.76 kB +61 B (+1.3%)
dist/preact.umd.js 4.8 kB +43 B (+0.9%)
ℹ️ 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.15 kB
debug/dist/debug.js 3.7 kB
debug/dist/debug.module.js 3.71 kB
debug/dist/debug.umd.js 3.78 kB
devtools/dist/devtools.js 259 B
devtools/dist/devtools.module.js 273 B
devtools/dist/devtools.umd.js 345 B
hooks/dist/hooks.js 1.56 kB
hooks/dist/hooks.module.js 1.59 kB
hooks/dist/hooks.umd.js 1.63 kB
jsx-runtime/dist/jsxRuntime.js 981 B
jsx-runtime/dist/jsxRuntime.module.js 956 B
jsx-runtime/dist/jsxRuntime.umd.js 1.06 kB
test-utils/dist/testUtils.js 451 B
test-utils/dist/testUtils.module.js 456 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@JoviDeCroock
Copy link
Member Author

Looks to be negligible

@JoviDeCroock JoviDeCroock deleted the perf-test branch June 19, 2024 07:23
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.

None yet

1 participant