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

[perf] Hoist render queue sorting fn #3921

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

developit
Copy link
Member

@developit developit commented Feb 28, 2023

Backport from #3834.

@github-actions
Copy link

github-actions bot commented Feb 28, 2023

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -1% - +3% (-1.36ms - +4.48ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -5% - +1% (-2.35ms - +0.52ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -1% - +0% (-10.19ms - +2.70ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -1% - +2% (-0.25ms - +0.39ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -2% - +2% (-2.53ms - +2.29ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -5% - +1% (-1.35ms - +0.17ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -4% - +1% (-0.11ms - +0.02ms)
    preact-local vs preact-master
  • todo: unsure 🔍 -2% - +1% (-0.92ms - +0.31ms)
    preact-local vs preact-master

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -1% - +3% (-0.04ms - +0.10ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.01ms - +0.00ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -5% - +4% (-0.67ms - +0.54ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-master
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master

Results

02_replace1k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master130.91ms - 135.22ms-unsure 🔍
-3% - +1%
-4.48ms - +1.36ms
unsure 🔍
-4% - +1%
-5.58ms - +1.08ms
preact-local132.66ms - 136.60msunsure 🔍
-1% - +3%
-1.36ms - +4.48ms
-unsure 🔍
-3% - +2%
-3.90ms - +2.53ms
preact-hooks132.77ms - 137.85msunsure 🔍
-1% - +4%
-1.08ms - +5.58ms
unsure 🔍
-2% - +3%
-2.53ms - +3.90ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master3.39ms - 3.39ms-unsure 🔍
-3% - +1%
-0.10ms - +0.04ms
faster ✔
1% - 1%
0.02ms - 0.03ms
preact-local3.35ms - 3.49msunsure 🔍
-1% - +3%
-0.04ms - +0.10ms
-unsure 🔍
-2% - +2%
-0.06ms - +0.08ms
preact-hooks3.41ms - 3.41msslower ❌
1% - 1%
0.02ms - 0.03ms
unsure 🔍
-2% - +2%
-0.08ms - +0.06ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master45.93ms - 47.92ms-unsure 🔍
-3% - +3%
-1.20ms - +1.36ms
unsure 🔍
-5% - +0%
-2.62ms - +0.06ms
preact-local46.04ms - 47.65msunsure 🔍
-3% - +3%
-1.36ms - +1.20ms
-faster ✔
0% - 5%
0.15ms - 2.57ms
preact-hooks47.30ms - 49.11msunsure 🔍
-0% - +6%
-0.06ms - +2.62ms
slower ❌
0% - 6%
0.15ms - 2.57ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master68.99ms - 71.29ms-unsure 🔍
-3% - +1%
-2.49ms - +0.74ms
unsure 🔍
-4% - +1%
-2.61ms - +0.71ms
preact-local69.88ms - 72.15msunsure 🔍
-1% - +4%
-0.74ms - +2.49ms
-unsure 🔍
-2% - +2%
-1.72ms - +1.57ms
preact-hooks69.90ms - 72.29msunsure 🔍
-1% - +4%
-0.71ms - +2.61ms
unsure 🔍
-2% - +2%
-1.57ms - +1.72ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master47.89ms - 52.26ms-unsure 🔍
-9% - +3%
-4.64ms - +1.48ms
unsure 🔍
-9% - +2%
-4.81ms - +1.26ms
preact-local49.52ms - 53.80msunsure 🔍
-3% - +9%
-1.48ms - +4.64ms
-unsure 🔍
-6% - +5%
-3.19ms - +2.81ms
preact-hooks49.74ms - 53.95msunsure 🔍
-3% - +10%
-1.26ms - +4.81ms
unsure 🔍
-5% - +6%
-2.81ms - +3.19ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master59.77ms - 63.86ms-unsure 🔍
-3% - +9%
-1.47ms - +5.19ms
unsure 🔍
-7% - +2%
-4.79ms - +1.47ms
preact-local57.33ms - 62.59msunsure 🔍
-8% - +2%
-5.19ms - +1.47ms
-unsure 🔍
-11% - -0%
-7.06ms - +0.02ms
preact-hooks61.11ms - 65.85msunsure 🔍
-2% - +8%
-1.47ms - +4.79ms
unsure 🔍
-0% - +12%
-0.02ms - +7.06ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master62.87ms - 66.09ms-unsure 🔍
-1% - +5%
-0.89ms - +3.40ms
unsure 🔍
-3% - +4%
-1.98ms - +2.28ms
preact-local61.81ms - 64.64msunsure 🔍
-5% - +1%
-3.40ms - +0.89ms
-unsure 🔍
-5% - +1%
-3.10ms - +0.88ms
preact-hooks62.93ms - 65.73msunsure 🔍
-4% - +3%
-2.28ms - +1.98ms
unsure 🔍
-1% - +5%
-0.88ms - +3.10ms
-

run-final

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master38.88ms - 42.57ms-unsure 🔍
-8% - +5%
-3.29ms - +1.98ms
unsure 🔍
-13% - +1%
-5.62ms - +0.49ms
preact-local39.50ms - 43.26msunsure 🔍
-5% - +8%
-1.98ms - +3.29ms
-unsure 🔍
-11% - +3%
-4.99ms - +1.17ms
preact-hooks40.86ms - 45.73msunsure 🔍
-1% - +14%
-0.49ms - +5.62ms
unsure 🔍
-3% - +12%
-1.17ms - +4.99ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master41.55ms - 43.54ms-unsure 🔍
-1% - +6%
-0.52ms - +2.35ms
unsure 🔍
-2% - +5%
-0.81ms - +2.10ms
preact-local40.60ms - 42.66msunsure 🔍
-5% - +1%
-2.35ms - +0.52ms
-unsure 🔍
-4% - +3%
-1.75ms - +1.21ms
preact-hooks40.84ms - 42.96msunsure 🔍
-5% - +2%
-2.10ms - +0.81ms
unsure 🔍
-3% - +4%
-1.21ms - +1.75ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master3.45ms - 3.45ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
faster ✔
0% - 1%
0.01ms - 0.02ms
preact-local3.44ms - 3.45msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-faster ✔
0% - 1%
0.01ms - 0.03ms
preact-hooks3.46ms - 3.47msslower ❌
0% - 1%
0.01ms - 0.02ms
slower ❌
0% - 1%
0.01ms - 0.03ms
-
07_create10k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1306.59ms - 1316.96ms-unsure 🔍
-0% - +1%
-2.70ms - +10.19ms
unsure 🔍
-0% - +1%
-5.88ms - +7.58ms
preact-local1304.21ms - 1311.86msunsure 🔍
-1% - +0%
-10.19ms - +2.70ms
-unsure 🔍
-1% - +0%
-8.65ms - +2.85ms
preact-hooks1306.64ms - 1315.22msunsure 🔍
-1% - +0%
-7.58ms - +5.88ms
unsure 🔍
-0% - +1%
-2.85ms - +8.65ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master25.36ms - 25.36ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local25.36ms - 25.36msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks25.38ms - 25.38msunsure 🔍
+0% - +0%
+0.02ms - +0.02ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
filter_list

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master23.02ms - 23.46ms-unsure 🔍
-2% - +1%
-0.39ms - +0.25ms
unsure 🔍
-2% - +1%
-0.38ms - +0.32ms
preact-local23.08ms - 23.54msunsure 🔍
-1% - +2%
-0.25ms - +0.39ms
-unsure 🔍
-1% - +2%
-0.32ms - +0.40ms
preact-hooks23.00ms - 23.55msunsure 🔍
-1% - +2%
-0.32ms - +0.38ms
unsure 🔍
-2% - +1%
-0.40ms - +0.32ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1.58ms - 1.58ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
1% - 1%
0.02ms - 0.02ms
preact-local1.58ms - 1.58msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
1% - 1%
0.02ms - 0.02ms
preact-hooks1.60ms - 1.60msslower ❌
1% - 1%
0.02ms - 0.02ms
slower ❌
1% - 1%
0.02ms - 0.02ms
-
hydrate1k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master123.41ms - 126.86ms-unsure 🔍
-2% - +2%
-2.29ms - +2.53ms
unsure 🔍
-3% - +1%
-3.50ms - +1.32ms
preact-local123.33ms - 126.70msunsure 🔍
-2% - +2%
-2.53ms - +2.29ms
-unsure 🔍
-3% - +1%
-3.60ms - +1.17ms
preact-hooks124.54ms - 127.91msunsure 🔍
-1% - +3%
-1.32ms - +3.50ms
unsure 🔍
-1% - +3%
-1.17ms - +3.60ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master12.56ms - 13.47ms-unsure 🔍
-4% - +5%
-0.54ms - +0.67ms
unsure 🔍
-7% - +2%
-0.97ms - +0.25ms
preact-local12.54ms - 13.35msunsure 🔍
-5% - +4%
-0.67ms - +0.54ms
-unsure 🔍
-7% - +1%
-1.01ms - +0.15ms
preact-hooks12.96ms - 13.79msunsure 🔍
-2% - +8%
-0.25ms - +0.97ms
unsure 🔍
-1% - +8%
-0.15ms - +1.01ms
-
many_updates

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master29.24ms - 30.28ms-unsure 🔍
-1% - +5%
-0.17ms - +1.35ms
unsure 🔍
-3% - +3%
-0.84ms - +0.76ms
preact-local28.61ms - 29.73msunsure 🔍
-5% - +1%
-1.35ms - +0.17ms
-unsure 🔍
-5% - +1%
-1.46ms - +0.19ms
preact-hooks29.19ms - 30.42msunsure 🔍
-3% - +3%
-0.76ms - +0.84ms
unsure 🔍
-1% - +5%
-0.19ms - +1.46ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master4.62ms - 4.63ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local4.62ms - 4.63msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks4.65ms - 4.65msunsure 🔍
+0% - +0%
+0.02ms - +0.02ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
text_update

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master3.01ms - 3.10ms-unsure 🔍
-1% - +4%
-0.02ms - +0.11ms
faster ✔
2% - 6%
0.06ms - 0.19ms
preact-local2.96ms - 3.06msunsure 🔍
-4% - +1%
-0.11ms - +0.02ms
-faster ✔
3% - 7%
0.11ms - 0.24ms
preact-hooks3.14ms - 3.22msslower ❌
2% - 6%
0.06ms - 0.19ms
slower ❌
4% - 8%
0.11ms - 0.24ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.81ms - 0.81ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
faster ✔
2% - 2%
0.01ms - 0.01ms
preact-local0.81ms - 0.81msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-faster ✔
2% - 2%
0.01ms - 0.01ms
preact-hooks0.82ms - 0.82msslower ❌
2% - 2%
0.01ms - 0.01ms
slower ❌
2% - 2%
0.01ms - 0.01ms
-
todo

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master60.30ms - 61.21ms-unsure 🔍
-1% - +2%
-0.31ms - +0.92ms
unsure 🔍
-2% - +0%
-1.18ms - +0.07ms
preact-local60.03ms - 60.86msunsure 🔍
-2% - +1%
-0.92ms - +0.31ms
-faster ✔
0% - 2%
0.27ms - 1.46ms
preact-hooks60.88ms - 61.73msunsure 🔍
-0% - +2%
-0.07ms - +1.18ms
slower ❌
0% - 2%
0.27ms - 1.46ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1.07ms - 1.07ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
2% - 2%
0.02ms - 0.03ms
preact-local1.07ms - 1.07msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
2% - 2%
0.02ms - 0.03ms
preact-hooks1.09ms - 1.09msslower ❌
2% - 3%
0.02ms - 0.03ms
slower ❌
2% - 3%
0.02ms - 0.03ms
-

tachometer-reporter-action v2 for Benchmarks

@coveralls
Copy link

coveralls commented Feb 28, 2023

Coverage Status

Coverage: 99.541% (-0.0007%) from 99.542% when pulling b060516 on hoist-render-queue-sort into bf39376 on master.

@github-actions
Copy link

Size Change: -14 B (0%)

Total Size: 54.1 kB

Filename Size Change
dist/preact.js 4.21 kB -4 B (0%)
dist/preact.min.js 4.24 kB -3 B (0%)
dist/preact.min.module.js 4.24 kB +1 B
dist/preact.min.umd.js 4.26 kB +1 B
dist/preact.module.js 4.23 kB -4 B (0%)
dist/preact.umd.js 4.27 kB -5 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.88 kB 0 B
compat/dist/compat.module.js 3.82 kB 0 B
compat/dist/compat.umd.js 3.95 kB 0 B
debug/dist/debug.js 3 kB 0 B
debug/dist/debug.module.js 3.01 kB 0 B
debug/dist/debug.umd.js 3.08 kB 0 B
devtools/dist/devtools.js 231 B 0 B
devtools/dist/devtools.module.js 240 B 0 B
devtools/dist/devtools.umd.js 314 B 0 B
hooks/dist/hooks.js 1.49 kB 0 B
hooks/dist/hooks.module.js 1.52 kB 0 B
hooks/dist/hooks.umd.js 1.57 kB 0 B
jsx-runtime/dist/jsxRuntime.js 360 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 326 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 441 B 0 B
test-utils/dist/testUtils.js 442 B 0 B
test-utils/dist/testUtils.module.js 444 B 0 B
test-utils/dist/testUtils.umd.js 526 B 0 B

compressed-size-action

@developit
Copy link
Member Author

note: we have no benchmark that exercises the render queue. I'll add one in another PR.

@marvinhagemeister marvinhagemeister merged commit 950b239 into master Feb 28, 2023
@marvinhagemeister marvinhagemeister deleted the hoist-render-queue-sort branch February 28, 2023 20:53
JoviDeCroock added a commit that referenced this pull request Jan 16, 2024
JoviDeCroock added a commit that referenced this pull request Jan 16, 2024
* backport #3911

* backport #3906

* backport #3837

* backport #3908

* backport #3904

* backport #3905

* backport #3898

* backport #3910

* backport #3948

* backport #3941

* backport #3945

* backport #3919

* backport #3922

* backport #3921

* backport #3903

* fix lint

* update more

* debug
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.

5 participants