Keyed results
Keyed implementations create an association between the domain data and a dom element by assigning a 'key'. If data changes the dom element with that key will be updated. In consequence inserting or deleting an element in the data array causes a corresponding change to the dom.
Duration in milliseconds ± 95% confidence interval (Slowdown = Duration / Fastest) | ||||||
Duration for... | vanillajs | gea-v1.0.0 | solid-v1.9.11 | svelte-v5.54.0 | vue-v3.6.0-beta.8 | react-hooks-v19.2.4 |
| Implementation notes | 772 | |||||
| Implementation link | code | code | code | code | code | code |
creating 1,000 rows. (5 warmup runs). | 24.30.2 (1.00) | 24.80.2 (1.02) | 25.40.4 (1.05) | 26.10.3 (1.07) | 29.70.4 (1.22) | 30.10.3 (1.24) |
updating all 1,000 rows. (5 warmup runs). | 26.60.3 (1.00) | 27.60.5 (1.04) | 29.50.4 (1.11) | 29.70.3 (1.12) | 32.70.5 (1.23) | 35.70.7 (1.34) |
updating every 10th row for 1,000 row. (3 warmup runs). 4 x CPU slowdown. | 15.10.6 (1.03) | 14.70.5 (1.00) | 15.91.0 (1.08) | 16.60.9 (1.13) | 19.40.6 (1.32) | 20.91.0 (1.42) |
highlighting a selected row. (5 warmup runs). 4 x CPU slowdown. | 3.80.3 (1.03) | 3.70.1 (1.00) | 4.70.3 (1.27) | 6.80.3 (1.84) | 5.70.4 (1.54) | 6.30.3 (1.70) |
swap 2 rows for table with 1,000 rows. (5 warmup runs). 4 x CPU slowdown. | 20.30.6 (1.26) | 16.10.5 (1.00) | 20.40.9 (1.27) | 21.30.8 (1.32) | 23.10.5 (1.43) | 122.72.2 (7.62) |
removing one row. (5 warmup runs). 2 x CPU slowdown. | 13.00.3 (1.03) | 12.60.4 (1.00) | 14.90.4 (1.18) | 13.60.3 (1.08) | 16.00.6 (1.27) | 16.90.3 (1.34) |
creating 10,000 rows. (5 warmup runs). | 253.21.8 (1.00) | 272.91.8 (1.08) | 270.12.7 (1.07) | 275.72.2 (1.09) | 301.02.2 (1.19) | 407.74.2 (1.61) |
appending 1,000 to a table of 1,000 rows. (5 warmup runs). | 29.40.5 (1.01) | 29.00.3 (1.00) | 30.70.4 (1.06) | 30.90.5 (1.07) | 33.90.5 (1.17) | 36.10.5 (1.24) |
clearing a table with 1,000 rows. (5 warmup runs). 4 x CPU slowdown. | 11.40.4 (1.00) | 12.50.2 (1.10) | 14.70.5 (1.29) | 13.80.3 (1.21) | 14.70.4 (1.29) | 21.50.4 (1.89) |
| of all factors in the table | 1.02 | 1.03 | 1.12 | 1.14 | 1.26 | 1.50 |
| compare: Green means significantly faster, red significantly slower | ||||||
Memory allocation in MBs ± 95% confidence interval | ||||||
| vanillajs | gea-v1.0.0 | solid-v1.9.11 | svelte-v5.54.0 | vue-v3.6.0-beta.8 | react-hooks-v19.2.4 | |
Memory usage after page load. | 0.52 (1.00) | 0.62 (1.19) | 0.56 (1.08) | 0.73 (1.40) | 0.88 (1.69) | 1.19 (2.29) |
Memory usage after adding 1,000 rows. | 1.83 (1.00) | 2.01 (1.10) | 2.63 (1.44) | 3.03 (1.66) | 3.93 (2.15) | 4.41 (2.41) |
Memory usage after creating and clearing 1000 rows 5 times | 0.62 (1.00) | 0.71 (1.15) | 0.74 (1.19) | 1.11 (1.79) | 1.22 (1.97) | 1.96 (3.16) |
| of all factors in the table | 1.00 | 1.14 | 1.23 | 1.61 | 1.93 | 2.59 |
Transferred size (in kBs) and first paint | ||||||
| vanillajs | gea-v1.0.0 | solid-v1.9.11 | svelte-v5.54.0 | vue-v3.6.0-beta.8 | react-hooks-v19.2.4 | |
uncompressed size of all implementation files (excluding /css and http headers) | 11.3 (1.00) | 39.9 (3.53) | 11.5 (1.02) | 38.3 (3.39) | 65.7 (5.81) | 190.3 (16.84) |
brotli compressed size of all implementation files (excluding /css and http headers) | 2.5 (1.00) | 10.9 (4.36) | 4.5 (1.80) | 13.3 (5.32) | 23.5 (9.40) | 51.4 (20.56) |
first paint | 43.3 (1.00) | 57.3 (1.32) | 52.8 (1.22) | 66.5 (1.54) | 98.6 (2.28) | 224.1 (5.18) |
| of all factors in the table | 1.00 | 2.73 | 1.31 | 3.03 | 4.99 | 12.15 |
Known issues and notes
- 634 [Issue]: The HTML structure for the implementation is not fully correct.
- 772 [Note]: Implementation uses manual DOM manipulations
- 796 [Note]: Implementation uses explicit requestAnimationFrame calls
- 800 [Note]: View state on the model
- 801 [Note]: Implementation uses manual event delegation
- 1139 [Note]: Implementation doesn't pass strict CSP
- 1261 [Note]: Manual caching of (v)dom nodes