You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR refactors the internal Value data structure that is used to hold a loaded or an unloaded map value. Previous we had stored Rc<Enum>-s where Enum was either a loaded value (Vec<u8>) or an unloaded value (offset: Bytes). The new representation stores a OnceCell inside the enum so we no longer need Rc.
The new representation makes it possible to hand out plain references to the loaded values (whereas a special Ref wrapper was necessary previously). Using this, we can optimize some of the code paths leading to good performance gains.
I think the CI recognizes only perf and not opt in the PR title.
Also, can you please un-commit the changes to canbench_results.yml? I'd like for the bot to first make the comment on what's the expected change (which also leaves a good paper trail of performance gains) and then if we agree this is a beneficial change, we can commit back the changes to the results file (not entirely sure the bot will post a comment if the results file is already changed).
---------------------------------------------------
Benchmark: btreemap_insert_blob_4_1024
total:
instructions: 633.93 M (-1.76%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 123 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_4_1024_v2
total:
instructions: 738.09 M (-1.21%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 92 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_8_1024
total:
instructions: 758.18 M (-1.60%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 183 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_8_1024_v2
total:
instructions: 866.29 M (-1.12%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 138 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_16_1024
total:
instructions: 839.06 M (-1.50%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 215 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_16_1024_v2
total:
instructions: 955.40 M (-1.05%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 161 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_32_1024
total:
instructions: 890.75 M (-1.44%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 230 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_32_1024_v2
total:
instructions: 1.01 B (-1.02%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 173 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_64_1024
total:
instructions: 1.16 B (-1.16%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 245 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_64_1024_v2
total:
instructions: 1.28 B (-0.85%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 183 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_128_1024
total:
instructions: 1.46 B (-0.95%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 260 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_128_1024_v2
total:
instructions: 1.57 B (-0.71%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 195 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_256_1024
total:
instructions: 2.03 B (-0.72%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 292 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_256_1024_v2
total:
instructions: 2.14 B (-0.56%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 219 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_512_1024
total:
instructions: 3.16 B (-0.51%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 351 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_512_1024_v2
total:
instructions: 3.28 B (-0.41%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 263 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_4
total:
instructions: 4.96 B (-1.21%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 235 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_4_v2
total:
instructions: 5.08 B (-1.13%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 176 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_8
total:
instructions: 5.04 B (-1.20%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 237 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_8_v2
total:
instructions: 5.16 B (-1.12%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 178 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_16
total:
instructions: 5.06 B (-1.19%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 241 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_16_v2
total:
instructions: 5.18 B (-1.11%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 181 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_32
total:
instructions: 5.07 B (-1.19%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 239 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_32_v2
total:
instructions: 5.19 B (-1.11%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 180 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_64
total:
instructions: 5.10 B (-1.18%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 250 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_64_v2
total:
instructions: 5.22 B (-1.11%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 188 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_128
total:
instructions: 5.10 B (-1.18%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 262 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_128_v2
total:
instructions: 5.22 B (-1.10%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 196 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_256
total:
instructions: 5.13 B (-1.18%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 292 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_256_v2
total:
instructions: 5.25 B (-1.10%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 219 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_512
total:
instructions: 5.25 B (-1.15%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 348 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_1024_512_v2
total:
instructions: 5.37 B (-1.07%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 261 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_u64_u64
total:
instructions: 374.70 M (improved by 3.97%)
heap_increase: 0 pages (no change)
stable_memory_increase: 7 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_u64_u64_v2
total:
instructions: 462.90 M (improved by 2.88%)
heap_increase: 0 pages (no change)
stable_memory_increase: 6 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_u64_blob_8
total:
instructions: 364.63 M (improved by 3.39%)
heap_increase: 0 pages (no change)
stable_memory_increase: 7 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_u64_blob_8_v2
total:
instructions: 450.22 M (improved by 2.28%)
heap_increase: 0 pages (no change)
stable_memory_increase: 5 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_8_u64
total:
instructions: 353.81 M (improved by 4.03%)
heap_increase: 0 pages (no change)
stable_memory_increase: 6 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_blob_8_u64_v2
total:
instructions: 473.69 M (improved by 2.06%)
heap_increase: 0 pages (no change)
stable_memory_increase: 4 pages (no change)
---------------------------------------------------
Benchmark: btreemap_insert_10mib_values
total:
instructions: 143.39 M (-0.27%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 32 pages (no change)
---------------------------------------------------
Benchmark: btreemap_read_keys_from_range
total:
instructions: 113.08 M (improved by 29.42%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_read_every_third_value_from_range
total:
instructions: 113.08 M (improved by 29.42%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_iter_small_values
total:
instructions: 14.53 M (improved by 9.02%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_iter_rev_small_values
total:
instructions: 14.52 M (improved by 9.13%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_iter_10mib_values
total:
instructions: 17.12 M (improved by 32.69%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_iter_rev_10mib_values
total:
instructions: 17.11 M (improved by 32.69%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_keys_small_values
total:
instructions: 10.29 M (1.78%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_keys_rev_small_values
total:
instructions: 10.53 M (1.74%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_keys_10mib_values
total:
instructions: 516.76 K (0.70%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_keys_rev_10mib_values
total:
instructions: 519.12 K (0.70%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_values_small_values
total:
instructions: 15.72 M (0.45%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_values_rev_small_values
total:
instructions: 15.76 M (0.45%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_values_10mib_values
total:
instructions: 17.14 M (0.00%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_values_rev_10mib_values
total:
instructions: 17.14 M (0.00%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_iter_count_small_values
total:
instructions: 10.16 M (1.80%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_iter_count_10mib_values
total:
instructions: 527.18 K (0.69%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_4_1024
total:
instructions: 639.95 M (improved by 2.14%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_4_1024_v2
total:
instructions: 763.71 M (-1.47%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_8_1024
total:
instructions: 843.33 M (improved by 2.29%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_8_1024_v2
total:
instructions: 986.54 M (-1.69%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_16_1024
total:
instructions: 1.05 B (improved by 2.18%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_16_1024_v2
total:
instructions: 1.21 B (-1.67%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_32_1024
total:
instructions: 1.13 B (improved by 2.11%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_32_1024_v2
total:
instructions: 1.29 B (-1.64%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_64_1024
total:
instructions: 1.46 B (-1.78%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_64_1024_v2
total:
instructions: 1.63 B (-1.43%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_128_1024
total:
instructions: 1.81 B (-1.51%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_128_1024_v2
total:
instructions: 1.98 B (-1.25%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_256_1024
total:
instructions: 2.48 B (-1.15%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_256_1024_v2
total:
instructions: 2.65 B (-0.97%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_512_1024
total:
instructions: 3.88 B (-0.85%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_512_1024_v2
total:
instructions: 4.04 B (-0.74%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_u64_u64
total:
instructions: 537.90 M (improved by 4.38%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_u64_u64_v2
total:
instructions: 668.54 M (improved by 3.26%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_u64_blob_8
total:
instructions: 516.87 M (improved by 4.48%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_u64_blob_8_v2
total:
instructions: 637.83 M (improved by 3.35%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_8_u64
total:
instructions: 465.95 M (improved by 4.23%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_remove_blob_8_u64_v2
total:
instructions: 626.30 M (improved by 2.76%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_4_1024
total:
instructions: 205.94 M (improved by 9.38%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_4_1024_v2
total:
instructions: 304.38 M (improved by 6.59%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_8_1024
total:
instructions: 242.80 M (improved by 9.60%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_8_1024_v2
total:
instructions: 337.86 M (improved by 6.58%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_16_1024
total:
instructions: 315.52 M (improved by 6.55%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_16_1024_v2
total:
instructions: 424.44 M (improved by 4.45%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_32_1024
total:
instructions: 359.08 M (improved by 5.98%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_32_1024_v2
total:
instructions: 467.64 M (improved by 4.27%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_64_1024
total:
instructions: 611.17 M (improved by 2.70%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_64_1024_v2
total:
instructions: 727.59 M (-1.89%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_128_1024
total:
instructions: 879.30 M (-1.61%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_128_1024_v2
total:
instructions: 986.23 M (-0.90%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_256_1024
total:
instructions: 1.41 B (-0.36%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_256_1024_v2
total:
instructions: 1.52 B (0.08%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_512_1024
total:
instructions: 2.47 B (0.63%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_512_1024_v2
total:
instructions: 2.57 B (0.85%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_u64_u64
total:
instructions: 199.39 M (improved by 4.81%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_u64_u64_v2
total:
instructions: 291.91 M (-0.31%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_u64_blob_8
total:
instructions: 198.16 M (improved by 3.86%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_u64_blob_8_v2
total:
instructions: 285.19 M (0.16%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_8_u64
total:
instructions: 215.48 M (improved by 4.52%)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: btreemap_get_blob_8_u64_v2
total:
instructions: 326.45 M (-0.33%) (change within noise threshold)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: memory_manager_baseline
total:
instructions: 1.18 B (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 8000 pages (no change)
---------------------------------------------------
Benchmark: memory_manager_overhead
total:
instructions: 1.18 B (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 8320 pages (no change)
---------------------------------------------------
Benchmark: memory_manager_grow
total:
instructions: 351.69 M (no change)
heap_increase: 2 pages (no change)
stable_memory_increase: 32.00 K pages (no change)
---------------------------------------------------
Benchmark: vec_insert_blob_4
total:
instructions: 3.98 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: vec_insert_blob_8
total:
instructions: 4.01 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 1 pages (no change)
---------------------------------------------------
Benchmark: vec_insert_blob_16
total:
instructions: 4.07 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 2 pages (no change)
---------------------------------------------------
Benchmark: vec_insert_blob_32
total:
instructions: 4.19 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 5 pages (no change)
---------------------------------------------------
Benchmark: vec_insert_blob_64
total:
instructions: 4.43 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 9 pages (no change)
---------------------------------------------------
Benchmark: vec_insert_blob_128
total:
instructions: 4.90 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 19 pages (no change)
---------------------------------------------------
Benchmark: vec_insert_u64
total:
instructions: 6.11 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 1 pages (no change)
---------------------------------------------------
Benchmark: vec_get_blob_4
total:
instructions: 5.89 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: vec_get_blob_8
total:
instructions: 7.15 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: vec_get_blob_16
total:
instructions: 9.95 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: vec_get_blob_32
total:
instructions: 10.86 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: vec_get_blob_64
total:
instructions: 15.71 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: vec_get_blob_128
total:
instructions: 21.62 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
Benchmark: vec_get_u64
total:
instructions: 6.43 M (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)
---------------------------------------------------
frankdavid
changed the title
opt: Refactor the internal Value data structure and make some performance improvements
perf: Refactor the internal Value data structure and make some performance improvements
Nov 19, 2024
can you please un-commit the changes to canbench_results.yml
Looks like the bot has added the comment and the comment says canbench_results.yml is up to date meaning the numbers that the bot calculated match the numbers that my local run produced. Nevertheless, I'm happy to uncommit and recommit the file if you think that makes sense.
can you please un-commit the changes to canbench_results.yml
Looks like the bot has added the comment and the comment says canbench_results.yml is up to date meaning the numbers that the bot calculated match the numbers that my local run produced. Nevertheless, I'm happy to uncommit and recommit the file if you think that makes sense.
No that's fine. I think this works even better then, you can already commit the change and we can still see the comment and validate it's a change we want.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the internal Value data structure that is used to hold a loaded or an unloaded map value. Previous we had stored
Rc<Enum>-s whereEnumwas either a loaded value (Vec<u8>) or an unloaded value (offset: Bytes). The new representation stores aOnceCellinside the enum so we no longer needRc.The new representation makes it possible to hand out plain references to the loaded values (whereas a special
Refwrapper was necessary previously). Using this, we can optimize some of the code paths leading to good performance gains.