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

Golf element diffing [-17b] #2942

Merged
merged 3 commits into from Jan 20, 2021
Merged

Golf element diffing [-17b] #2942

merged 3 commits into from Jan 20, 2021

Conversation

developit
Copy link
Member

This takes advantage of the fact that Text.prototype.localName === undefined to skip a few property lookups, savings bytes and hopefully also improving performance a tiny bit.

@github-actions
Copy link

github-actions bot commented Jan 20, 2021

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -0% - +1% (-0.66ms - +0.89ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -6% - +2% (-1.75ms - +0.62ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -12% - +6% (-171.88ms - +95.67ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -1% - +3% (-0.30ms - +0.76ms)
    preact-local vs preact-master
  • hydrate1k: slower ❌ 0% - 1% (0.03ms - 1.67ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -4% - +12% (-1.21ms - +3.77ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -5% - +5% (-0.13ms - +0.13ms)
    preact-local vs preact-master

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    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 🔍 -0% - +0% (-0.00ms - +0.00ms)
    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

Results

02_replace1k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #748
  • Commit: 0e9fbf1

duration

VersionAvg timevs preact-mastervs preact-local
preact-master144.94ms - 145.72ms-unsure 🔍
-1% - +0%
-0.89ms - +0.66ms
preact-local144.77ms - 146.11msunsure 🔍
-0% - +1%
-0.66ms - +0.89ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.59ms - 3.60ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-local3.59ms - 3.60msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-local
preact-master54.50ms - 55.32ms-unsure 🔍
-1% - +1%
-0.57ms - +0.47ms
preact-local54.64ms - 55.27msunsure 🔍
-1% - +1%
-0.47ms - +0.57ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-local
preact-master85.15ms - 86.16ms-unsure 🔍
-2% - +0%
-1.38ms - +0.24ms
preact-local85.59ms - 86.86msunsure 🔍
-0% - +2%
-0.24ms - +1.38ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-local
preact-master99.15ms - 100.39ms-unsure 🔍
-1% - +3%
-0.88ms - +2.69ms
preact-local97.19ms - 100.54msunsure 🔍
-3% - +1%
-2.69ms - +0.88ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-local
preact-master53.33ms - 54.23ms-unsure 🔍
-4% - +1%
-2.12ms - +0.63ms
preact-local53.23ms - 55.82msunsure 🔍
-1% - +4%
-0.63ms - +2.12ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-local
preact-master110.10ms - 112.44ms-unsure 🔍
-0% - +3%
-0.12ms - +3.05ms
preact-local108.73ms - 110.88msunsure 🔍
-3% - +0%
-3.05ms - +0.12ms
-

run-final

VersionAvg timevs preact-mastervs preact-local
preact-master54.12ms - 54.65ms-unsure 🔍
-1% - +1%
-0.67ms - +0.58ms
preact-local53.86ms - 55.00msunsure 🔍
-1% - +1%
-0.58ms - +0.67ms
-
03_update10th1k_x16
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 130
  • Built by: CI #748
  • Commit: 0e9fbf1

duration

VersionAvg timevs preact-mastervs preact-local
preact-master30.36ms - 32.13ms-unsure 🔍
-2% - +6%
-0.62ms - +1.75ms
preact-local29.90ms - 31.46msunsure 🔍
-6% - +2%
-1.75ms - +0.62ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.52ms - 3.52ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-local3.52ms - 3.52msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
07_create10k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 70
  • Built by: CI #748
  • Commit: 0e9fbf1

duration

VersionAvg timevs preact-mastervs preact-local
preact-master1362.10ms - 1576.17ms-unsure 🔍
-7% - +12%
-95.67ms - +171.88ms
preact-local1350.78ms - 1511.28msunsure 🔍
-12% - +6%
-171.88ms - +95.67ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master25.98ms - 25.98ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local25.98ms - 25.99msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter_list
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #748
  • Commit: 0e9fbf1

duration

VersionAvg timevs preact-mastervs preact-local
preact-master28.55ms - 29.24ms-unsure 🔍
-3% - +1%
-0.76ms - +0.30ms
preact-local28.72ms - 29.52msunsure 🔍
-1% - +3%
-0.30ms - +0.76ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master1.59ms - 1.60ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
preact-local1.60ms - 1.60msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-
hydrate1k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #748
  • Commit: 0e9fbf1

duration

VersionAvg timevs preact-mastervs preact-local
preact-master132.82ms - 133.89ms-faster ✔
0% - 1%
0.03ms - 1.67ms
preact-local133.58ms - 134.83msslower ❌
0% - 1%
0.03ms - 1.67ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master6.19ms - 6.19ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local6.19ms - 6.19msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
many_updates
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 80
  • Built by: CI #748
  • Commit: 0e9fbf1

duration

VersionAvg timevs preact-mastervs preact-local
preact-master31.32ms - 34.72ms-unsure 🔍
-11% - +3%
-3.77ms - +1.21ms
preact-local32.48ms - 36.12msunsure 🔍
-4% - +12%
-1.21ms - +3.77ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master4.84ms - 4.84ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local4.84ms - 4.84msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
text_update
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 150
  • Built by: CI #748
  • Commit: 0e9fbf1

duration

VersionAvg timevs preact-mastervs preact-local
preact-master2.77ms - 2.97ms-unsure 🔍
-5% - +5%
-0.13ms - +0.13ms
preact-local2.79ms - 2.96msunsure 🔍
-5% - +5%
-0.13ms - +0.13ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master0.83ms - 0.83ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-local0.83ms - 0.83msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-

tachometer-reporter-action v2 for CI

@coveralls
Copy link

coveralls commented Jan 20, 2021

Coverage Status

Coverage increased (+0.001%) to 99.439% when pulling 322d471 on golf-dom-diffing into 7dcc323 on master.

@github-actions
Copy link

Size Change: -70 B (0%)

Total Size: 41.9 kB

Filename Size Change
dist/preact.js 3.94 kB -17 B (0%)
dist/preact.min.js 3.97 kB -16 B (0%)
dist/preact.module.js 3.97 kB -19 B (0%)
dist/preact.umd.js 4.01 kB -18 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.45 kB 0 B
compat/dist/compat.module.js 3.47 kB 0 B
compat/dist/compat.umd.js 3.51 kB 0 B
debug/dist/debug.js 2.99 kB 0 B
debug/dist/debug.module.js 2.98 kB 0 B
debug/dist/debug.umd.js 3.07 kB 0 B
devtools/dist/devtools.js 186 B 0 B
devtools/dist/devtools.module.js 196 B 0 B
devtools/dist/devtools.umd.js 261 B 0 B
hooks/dist/hooks.js 1.13 kB 0 B
hooks/dist/hooks.module.js 1.15 kB 0 B
hooks/dist/hooks.umd.js 1.2 kB 0 B
jsx-runtime/dist/jsxRuntime.js 327 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 335 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 405 B 0 B
test-utils/dist/testUtils.js 437 B 0 B
test-utils/dist/testUtils.module.js 439 B 0 B
test-utils/dist/testUtils.umd.js 515 B 0 B

compressed-size-action

@developit developit changed the title Golf element diffing Golf element diffing [-17b] Jan 20, 2021
@andrewiggins
Copy link
Member

Yea, I really got fix up this reporter thing to not hit the limit so much lol

@github-actions
Copy link

github-actions bot commented Jan 20, 2021

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -0% - +1% (-0.62ms - +1.98ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -5% - +4% (-1.44ms - +1.28ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +2% (-2.18ms - +31.19ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -2% - +3% (-0.69ms - +0.90ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -1% - +0% (-1.17ms - +0.70ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -11% - +3% (-4.09ms - +0.95ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -3% - +1% (-0.09ms - +0.04ms)
    preact-local vs preact-master

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    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 🔍 -0% - +0% (-0.00ms - +0.00ms)
    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

Results

02_replace1k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #757
  • Commit: 67a5c35

duration

VersionAvg timevs preact-mastervs preact-local
preact-master155.90ms - 157.00ms-unsure 🔍
-1% - +0%
-1.98ms - +0.62ms
preact-local155.95ms - 158.31msunsure 🔍
-0% - +1%
-0.62ms - +1.98ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.59ms - 3.60ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
preact-local3.59ms - 3.60msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-local
preact-master55.97ms - 58.08ms-unsure 🔍
-1% - +3%
-0.61ms - +1.82ms
preact-local55.82ms - 57.03msunsure 🔍
-3% - +1%
-1.82ms - +0.61ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-local
preact-master88.00ms - 89.11ms-unsure 🔍
-1% - +1%
-1.29ms - +0.79ms
preact-local87.93ms - 89.68msunsure 🔍
-1% - +1%
-0.79ms - +1.29ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-local
preact-master101.83ms - 103.39ms-unsure 🔍
-1% - +1%
-1.25ms - +0.94ms
preact-local102.01ms - 103.52msunsure 🔍
-1% - +1%
-0.94ms - +1.25ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-local
preact-master57.24ms - 58.07ms-unsure 🔍
-1% - +1%
-0.78ms - +0.50ms
preact-local57.31ms - 58.28msunsure 🔍
-1% - +1%
-0.50ms - +0.78ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-local
preact-master110.43ms - 113.69ms-unsure 🔍
-3% - +1%
-2.96ms - +1.01ms
preact-local111.90ms - 114.16msunsure 🔍
-1% - +3%
-1.01ms - +2.96ms
-

run-final

VersionAvg timevs preact-mastervs preact-local
preact-master56.38ms - 56.77ms-unsure 🔍
-1% - +0%
-0.56ms - +0.19ms
preact-local56.44ms - 57.09msunsure 🔍
-0% - +1%
-0.19ms - +0.56ms
-
03_update10th1k_x16
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 80
  • Built by: CI #757
  • Commit: 67a5c35

duration

VersionAvg timevs preact-mastervs preact-local
preact-master30.02ms - 31.88ms-unsure 🔍
-4% - +5%
-1.28ms - +1.44ms
preact-local29.88ms - 31.85msunsure 🔍
-5% - +4%
-1.44ms - +1.28ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.51ms - 3.52ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-local3.51ms - 3.52msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
07_create10k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #757
  • Commit: 67a5c35

duration

VersionAvg timevs preact-mastervs preact-local
preact-master1344.33ms - 1367.56ms-unsure 🔍
-2% - +0%
-31.19ms - +2.18ms
preact-local1358.47ms - 1382.43msunsure 🔍
-0% - +2%
-2.18ms - +31.19ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master25.98ms - 25.98ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local25.98ms - 25.99msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter_list
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #757
  • Commit: 67a5c35

duration

VersionAvg timevs preact-mastervs preact-local
preact-master27.31ms - 28.48ms-unsure 🔍
-3% - +2%
-0.90ms - +0.69ms
preact-local27.46ms - 28.54msunsure 🔍
-2% - +3%
-0.69ms - +0.90ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master1.60ms - 1.60ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local1.60ms - 1.60msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #757
  • Commit: 67a5c35

duration

VersionAvg timevs preact-mastervs preact-local
preact-master143.56ms - 144.96ms-unsure 🔍
-0% - +1%
-0.70ms - +1.17ms
preact-local143.40ms - 144.64msunsure 🔍
-1% - +0%
-1.17ms - +0.70ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master6.19ms - 6.19ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local6.19ms - 6.19msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
many_updates
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 80
  • Built by: CI #757
  • Commit: 67a5c35

duration

VersionAvg timevs preact-mastervs preact-local
preact-master33.21ms - 37.09ms-unsure 🔍
-3% - +12%
-0.95ms - +4.09ms
preact-local31.97ms - 35.18msunsure 🔍
-11% - +3%
-4.09ms - +0.95ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master4.84ms - 4.84ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local4.84ms - 4.84msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
text_update
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #757
  • Commit: 67a5c35

duration

VersionAvg timevs preact-mastervs preact-local
preact-master2.80ms - 2.88ms-unsure 🔍
-1% - +3%
-0.04ms - +0.09ms
preact-local2.77ms - 2.86msunsure 🔍
-3% - +1%
-0.09ms - +0.04ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master0.83ms - 0.83ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-local0.83ms - 0.83msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-

tachometer-reporter-action v2 for CI

@marvinhagemeister marvinhagemeister merged commit 8d3bbec into master Jan 20, 2021
@marvinhagemeister marvinhagemeister deleted the golf-dom-diffing branch January 20, 2021 09:15
marvinhagemeister added a commit that referenced this pull request Jan 23, 2021
This PR resolves a regression when react-dom/server was used to render
a Preact app. It was introduced in #2942
marvinhagemeister added a commit that referenced this pull request Jan 23, 2021
This PR resolves a regression when react-dom/server was used to render
a Preact app. It was introduced in #2942
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

5 participants