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

fix: increment skew when we aren't removing the first pointer #4284

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

JoviDeCroock
Copy link
Member

fixes #4283

Copy link

github-actions bot commented Feb 17, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -3% - +0% (-2.53ms - +0.27ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: unsure 🔍 -5% - +2% (-1.63ms - +0.75ms)
    preact-local vs preact-main
  • 07_create10k: unsure 🔍 -1% - +1% (-4.74ms - +12.55ms)
    preact-local vs preact-main
  • filter_list: unsure 🔍 -0% - +0% (-0.02ms - +0.08ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +2% (-1.48ms - +1.61ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 -2% - +3% (-0.29ms - +0.44ms)
    preact-local vs preact-main
  • text_update: unsure 🔍 -4% - +5% (-0.09ms - +0.12ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +0% (-0.37ms - +0.07ms)
    preact-local vs preact-main

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.01ms - +0.00ms)
    preact-local vs preact-main
  • 07_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.01ms - +0.00ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 -0% - +0% (-0.00ms - +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

Results

02_replace1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main76.77ms - 79.38ms-unsure 🔍
-0% - +3%
-0.27ms - +2.53ms
unsure 🔍
-1% - +3%
-0.50ms - +2.23ms
preact-local76.43ms - 77.45msunsure 🔍
-3% - +0%
-2.53ms - +0.27ms
-unsure 🔍
-1% - +0%
-0.91ms - +0.38ms
preact-hooks76.82ms - 77.60msunsure 🔍
-3% - +1%
-2.23ms - +0.50ms
unsure 🔍
-0% - +1%
-0.38ms - +0.91ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.48ms - 3.48ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
1% - 1%
0.02ms - 0.02ms
preact-local3.48ms - 3.48msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
1% - 1%
0.02ms - 0.02ms
preact-hooks3.50ms - 3.50msslower ❌
1% - 1%
0.02ms - 0.02ms
slower ❌
1% - 1%
0.02ms - 0.02ms
-

run-warmup-0

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main29.97ms - 31.08ms-unsure 🔍
-2% - +3%
-0.62ms - +0.83ms
unsure 🔍
-5% - +0%
-1.48ms - +0.09ms
preact-local29.94ms - 30.89msunsure 🔍
-3% - +2%
-0.83ms - +0.62ms
-faster ✔
0% - 5%
0.07ms - 1.53ms
preact-hooks30.66ms - 31.77msunsure 🔍
-0% - +5%
-0.09ms - +1.48ms
slower ❌
0% - 5%
0.07ms - 1.53ms
-

run-warmup-1

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main39.46ms - 41.28ms-unsure 🔍
-2% - +4%
-0.87ms - +1.56ms
unsure 🔍
-5% - +0%
-1.91ms - +0.20ms
preact-local39.23ms - 40.83msunsure 🔍
-4% - +2%
-1.56ms - +0.87ms
-faster ✔
1% - 5%
0.24ms - 2.17ms
preact-hooks40.70ms - 41.77msunsure 🔍
-1% - +5%
-0.20ms - +1.91ms
slower ❌
1% - 5%
0.24ms - 2.17ms
-

run-warmup-2

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.52ms - 26.95ms-unsure 🔍
-1% - +1%
-0.27ms - +0.26ms
unsure 🔍
-1% - +1%
-0.39ms - +0.15ms
preact-local26.59ms - 26.90msunsure 🔍
-1% - +1%
-0.26ms - +0.27ms
-unsure 🔍
-1% - +0%
-0.34ms - +0.11ms
preact-hooks26.69ms - 27.02msunsure 🔍
-1% - +1%
-0.15ms - +0.39ms
unsure 🔍
-0% - +1%
-0.11ms - +0.34ms
-

run-warmup-3

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main25.24ms - 26.31ms-unsure 🔍
-1% - +5%
-0.19ms - +1.24ms
unsure 🔍
-6% - +1%
-1.51ms - +0.15ms
preact-local24.78ms - 25.73msunsure 🔍
-5% - +1%
-1.24ms - +0.19ms
-faster ✔
2% - 7%
0.42ms - 2.00ms
preact-hooks25.82ms - 27.09msunsure 🔍
-1% - +6%
-0.15ms - +1.51ms
slower ❌
2% - 8%
0.42ms - 2.00ms
-

run-warmup-4

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main28.04ms - 29.80ms-unsure 🔍
-4% - +5%
-1.28ms - +1.36ms
unsure 🔍
-4% - +2%
-1.28ms - +0.65ms
preact-local27.90ms - 29.86msunsure 🔍
-5% - +4%
-1.36ms - +1.28ms
-unsure 🔍
-5% - +2%
-1.41ms - +0.70ms
preact-hooks28.84ms - 29.63msunsure 🔍
-2% - +4%
-0.65ms - +1.28ms
unsure 🔍
-2% - +5%
-0.70ms - +1.41ms
-

run-final

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main22.85ms - 24.01ms-unsure 🔍
-2% - +4%
-0.43ms - +0.95ms
unsure 🔍
-3% - +3%
-0.70ms - +0.65ms
preact-local22.80ms - 23.54msunsure 🔍
-4% - +2%
-0.95ms - +0.43ms
-unsure 🔍
-3% - +1%
-0.79ms - +0.23ms
preact-hooks23.10ms - 23.80msunsure 🔍
-3% - +3%
-0.65ms - +0.70ms
unsure 🔍
-1% - +3%
-0.23ms - +0.79ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main30.58ms - 32.31ms-unsure 🔍
-2% - +5%
-0.75ms - +1.63ms
unsure 🔍
-2% - +7%
-0.46ms - +2.00ms
preact-local30.19ms - 31.83msunsure 🔍
-5% - +2%
-1.63ms - +0.75ms
-unsure 🔍
-3% - +5%
-0.87ms - +1.53ms
preact-hooks29.80ms - 31.55msunsure 🔍
-6% - +1%
-2.00ms - +0.46ms
unsure 🔍
-5% - +3%
-1.53ms - +0.87ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.44ms - 3.45ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
faster ✔
0% - 1%
0.01ms - 0.02ms
preact-local3.44ms - 3.44msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-faster ✔
0% - 1%
0.01ms - 0.02ms
preact-hooks3.45ms - 3.46msslower ❌
0% - 1%
0.01ms - 0.02ms
slower ❌
0% - 1%
0.01ms - 0.02ms
-
07_create10k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main924.66ms - 935.06ms-unsure 🔍
-1% - +1%
-12.55ms - +4.74ms
unsure 🔍
-1% - +0%
-9.02ms - +3.45ms
preact-local926.86ms - 940.68msunsure 🔍
-1% - +1%
-4.74ms - +12.55ms
-unsure 🔍
-1% - +1%
-6.60ms - +8.83ms
preact-hooks929.21ms - 936.09msunsure 🔍
-0% - +1%
-3.45ms - +9.02ms
unsure 🔍
-1% - +1%
-8.83ms - +6.60ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.48ms - 26.48ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local26.48ms - 26.48msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks26.50ms - 26.50msunsure 🔍
+0% - +0%
+0.02ms - +0.02ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
filter_list

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main16.55ms - 16.62ms-unsure 🔍
-0% - +0%
-0.08ms - +0.02ms
unsure 🔍
-0% - +0%
-0.08ms - +0.03ms
preact-local16.58ms - 16.65msunsure 🔍
-0% - +0%
-0.02ms - +0.08ms
-unsure 🔍
-0% - +0%
-0.06ms - +0.06ms
preact-hooks16.57ms - 16.66msunsure 🔍
-0% - +0%
-0.03ms - +0.08ms
unsure 🔍
-0% - +0%
-0.06ms - +0.06ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main1.49ms - 1.49ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
2% - 2%
0.02ms - 0.03ms
preact-local1.49ms - 1.49msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
2% - 2%
0.03ms - 0.03ms
preact-hooks1.52ms - 1.52msslower ❌
2% - 2%
0.02ms - 0.03ms
slower ❌
2% - 2%
0.03ms - 0.03ms
-
hydrate1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main75.11ms - 76.88ms-unsure 🔍
-2% - +2%
-1.61ms - +1.48ms
unsure 🔍
-2% - +1%
-1.31ms - +0.90ms
preact-local74.79ms - 77.33msunsure 🔍
-2% - +2%
-1.48ms - +1.61ms
-unsure 🔍
-2% - +2%
-1.57ms - +1.30ms
preact-hooks75.53ms - 76.87msunsure 🔍
-1% - +2%
-0.90ms - +1.31ms
unsure 🔍
-2% - +2%
-1.30ms - +1.57ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main6.17ms - 6.18ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
unsure 🔍
-0% - -0%
-0.02ms - -0.01ms
preact-local6.17ms - 6.18msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.03ms - -0.02ms
preact-hooks6.20ms - 6.20msunsure 🔍
+0% - +0%
+0.01ms - +0.02ms
unsure 🔍
+0% - +0%
+0.02ms - +0.03ms
-
many_updates

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main16.45ms - 16.90ms-unsure 🔍
-3% - +2%
-0.44ms - +0.29ms
unsure 🔍
-1% - +3%
-0.15ms - +0.41ms
preact-local16.45ms - 17.04msunsure 🔍
-2% - +3%
-0.29ms - +0.44ms
-unsure 🔍
-1% - +3%
-0.14ms - +0.55ms
preact-hooks16.37ms - 16.72msunsure 🔍
-2% - +1%
-0.41ms - +0.15ms
unsure 🔍
-3% - +1%
-0.55ms - +0.14ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main4.60ms - 4.60ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local4.59ms - 4.60msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
0% - 1%
0.02ms - 0.02ms
preact-hooks4.62ms - 4.62msunsure 🔍
+0% - +0%
+0.02ms - +0.02ms
slower ❌
0% - 1%
0.02ms - 0.02ms
-
text_update

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main2.46ms - 2.62ms-unsure 🔍
-5% - +4%
-0.12ms - +0.09ms
faster ✔
6% - 13%
0.16ms - 0.35ms
preact-local2.48ms - 2.63msunsure 🔍
-4% - +5%
-0.09ms - +0.12ms
-faster ✔
5% - 12%
0.14ms - 0.33ms
preact-hooks2.74ms - 2.85msslower ❌
6% - 14%
0.16ms - 0.35ms
slower ❌
5% - 13%
0.14ms - 0.33ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.72ms - 0.72ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
faster ✔
3% - 3%
0.02ms - 0.02ms
preact-local0.72ms - 0.72msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-faster ✔
3% - 3%
0.02ms - 0.02ms
preact-hooks0.75ms - 0.75msslower ❌
3% - 3%
0.02ms - 0.02ms
slower ❌
3% - 3%
0.02ms - 0.02ms
-
todo

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.70ms - 26.98ms-unsure 🔍
-0% - +1%
-0.07ms - +0.37ms
faster ✔
1% - 3%
0.40ms - 0.85ms
preact-local26.52ms - 26.85msunsure 🔍
-1% - +0%
-0.37ms - +0.07ms
-faster ✔
2% - 4%
0.53ms - 1.01ms
preact-hooks27.28ms - 27.64msslower ❌
1% - 3%
0.40ms - 0.85ms
slower ❌
2% - 4%
0.53ms - 1.01ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.95ms - 0.95ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
faster ✔
3% - 3%
0.03ms - 0.03ms
preact-local0.95ms - 0.95msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-faster ✔
3% - 3%
0.03ms - 0.03ms
preact-hooks0.98ms - 0.98msslower ❌
3% - 3%
0.03ms - 0.03ms
slower ❌
3% - 3%
0.03ms - 0.03ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

github-actions bot commented Feb 17, 2024

Size Change: +44 B (0%)

Total Size: 60.1 kB

Filename Size Change
dist/preact.js 4.55 kB +7 B (0%)
dist/preact.min.js 4.59 kB +7 B (0%)
dist/preact.min.module.js 4.59 kB +7 B (0%)
dist/preact.min.umd.js 4.62 kB +7 B (0%)
dist/preact.module.js 4.58 kB +7 B (0%)
dist/preact.umd.js 4.63 kB +9 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 4 kB 0 B
compat/dist/compat.module.js 3.92 kB 0 B
compat/dist/compat.umd.js 4.06 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 232 B 0 B
devtools/dist/devtools.module.js 241 B 0 B
devtools/dist/devtools.umd.js 316 B 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
jsx-runtime/dist/jsxRuntime.js 963 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 938 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 1.04 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

coveralls commented Feb 17, 2024

Coverage Status

coverage: 99.472%. remained the same
when pulling b558242 on fix-and-add-test-for-4283
into a003d42 on main.

If we've skewed our matching before hitting a null placeholder (e.g. we've inserted or removed an unmatched node) then let's pick up matching null placeholders from the skewedIndex.

Note I don't think we need to adjust the skew when we find a null placeholder, we treat it as
"matching" the current node.
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.

"Components keep being added when updating state" issue persists when using tags other than div
4 participants