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

feat: implement DoubleEndedIterator for StableBTreeMap #235

Merged
merged 18 commits into from
Nov 12, 2024

Conversation

hpeebles
Copy link
Contributor

@hpeebles hpeebles commented Nov 7, 2024

This adds the ability to iterate a StableBTreeMap in either direction.
We have been using this within OpenChat for a few weeks now with no issues.

@hpeebles
Copy link
Contributor Author

hpeebles commented Nov 7, 2024

I don't really understand the use case for iter_upper_bound, but it was previously calculating the cursors to start iterating from then passing them in when creating an Iter instance, whereas now that we can iterate backwards we can simply use next_back to calculate the starting point and then iterate forwards from there.
This does unnecessarily deserialize the value at the starting point though within the call to next_back, so we could potentially add something like keys and range_keys which does the same thing but only yields the keys without deserializing the values.

Maybe keys and range_keys are worth adding regardless of this extra deserialization. I'd be happy to add them in a follow on PR if others agree they are worth having.

src/btreemap/iter.rs Show resolved Hide resolved
src/btreemap/iter.rs Show resolved Hide resolved
src/btreemap/iter.rs Outdated Show resolved Hide resolved
src/btreemap/iter.rs Outdated Show resolved Hide resolved
src/btreemap/iter.rs Outdated Show resolved Hide resolved
src/btreemap/iter.rs Show resolved Hide resolved
src/btreemap/iter.rs Outdated Show resolved Hide resolved
src/btreemap/iter.rs Outdated Show resolved Hide resolved
src/btreemap/iter.rs Show resolved Hide resolved
src/btreemap/iter.rs Show resolved Hide resolved
@dsarlis
Copy link
Member

dsarlis commented Nov 8, 2024

Can you also revert the changes in canbench_results.txt, I'd like to first see what's the diff in benches, then we can put it back in (I expect a very small acceptable regression that you also mentioned but would like to confirm).

@dsarlis
Copy link
Member

dsarlis commented Nov 8, 2024

Maybe keys and range_keys are worth adding regardless of this extra deserialization. I'd be happy to add them in a follow on PR if others agree they are worth having.

I don't feel particularly strongly either way. If indeed people find them useful, I don't see why not adding them. In a sense, we should ideally provide a very similar interface to the std BTreeMap but of course these things typically happen on a "as needed" basis.

@hpeebles
Copy link
Contributor Author

hpeebles commented Nov 11, 2024

Maybe keys and range_keys are worth adding regardless of this extra deserialization. I'd be happy to add them in a follow on PR if others agree they are worth having.

I don't feel particularly strongly either way. If indeed people find them useful, I don't see why not adding them. In a sense, we should ideally provide a very similar interface to the std BTreeMap but of course these things typically happen on a "as needed" basis.

Yeah let's hold off for now but I think it would be good to have them at some point since within OpenChat we already have some use cases where we load both keys and values when we only need keys.

dsarlis
dsarlis previously approved these changes Nov 12, 2024
src/btreemap/iter.rs Show resolved Hide resolved
src/btreemap/iter.rs Show resolved Hide resolved
Copy link

github-actions bot commented Nov 12, 2024

canbench 🏋 (dir: .)

Significant performance change detected! ⚠️

./canbench_results.yml is up to date ✅


---------------------------------------------------

Benchmark: btreemap_insert_blob_4_1024
  total:
    instructions: 702.29 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 123 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_4_1024_v2
  total:
    instructions: 787.28 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 92 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_8_1024
  total:
    instructions: 828.11 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 183 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_8_1024_v2
  total:
    instructions: 919.90 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 138 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_16_1024
  total:
    instructions: 914.66 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 215 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_16_1024_v2
  total:
    instructions: 1.01 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 161 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_32_1024
  total:
    instructions: 971.20 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 230 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_32_1024_v2
  total:
    instructions: 1.06 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 173 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_64_1024
  total:
    instructions: 1.24 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 245 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_64_1024_v2
  total:
    instructions: 1.35 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 183 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_128_1024
  total:
    instructions: 1.52 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 260 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_128_1024_v2
  total:
    instructions: 1.65 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 195 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_256_1024
  total:
    instructions: 2.07 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 292 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_256_1024_v2
  total:
    instructions: 2.26 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 219 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_512_1024
  total:
    instructions: 3.20 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 351 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_512_1024_v2
  total:
    instructions: 3.46 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 263 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_4
  total:
    instructions: 5.01 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 235 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_4_v2
  total:
    instructions: 5.41 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 176 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_8
  total:
    instructions: 5.10 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 237 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_8_v2
  total:
    instructions: 5.49 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 178 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_16
  total:
    instructions: 5.12 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 241 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_16_v2
  total:
    instructions: 5.51 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 181 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_32
  total:
    instructions: 5.12 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 239 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_32_v2
  total:
    instructions: 5.51 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 180 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_64
  total:
    instructions: 5.16 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 250 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_64_v2
  total:
    instructions: 5.55 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 188 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_128
  total:
    instructions: 5.16 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 262 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_128_v2
  total:
    instructions: 5.55 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 196 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_256
  total:
    instructions: 5.18 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 292 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_256_v2
  total:
    instructions: 5.57 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 219 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_512
  total:
    instructions: 5.30 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 348 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_512_v2
  total:
    instructions: 5.69 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 261 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_u64_u64
  total:
    instructions: 448.33 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 7 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_u64_u64_v2
  total:
    instructions: 518.61 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 6 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_u64_blob_8
  total:
    instructions: 435.86 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 7 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_u64_blob_8_v2
  total:
    instructions: 502.39 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 5 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_8_u64
  total:
    instructions: 424.33 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 6 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_8_u64_v2
  total:
    instructions: 524.55 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 4 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_10mib_values
  total:
    instructions: 145.92 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 32 pages (no change)

---------------------------------------------------

Benchmark: btreemap_iter_small_values (new)
  total:
    instructions: 23.72 M (new)
    heap_increase: 0 pages (new)
    stable_memory_increase: 0 pages (new)

---------------------------------------------------

Benchmark: btreemap_iter_rev_small_values (new)
  total:
    instructions: 23.88 M (new)
    heap_increase: 0 pages (new)
    stable_memory_increase: 0 pages (new)

---------------------------------------------------

Benchmark: btreemap_iter_10mib_values (new)
  total:
    instructions: 25.58 M (new)
    heap_increase: 0 pages (new)
    stable_memory_increase: 0 pages (new)

---------------------------------------------------

Benchmark: btreemap_iter_rev_10mib_values (new)
  total:
    instructions: 25.59 M (new)
    heap_increase: 0 pages (new)
    stable_memory_increase: 0 pages (new)

---------------------------------------------------

Benchmark: btreemap_iter_count_small_values
  total:
    instructions: 11.01 M (regressed by 5.25%)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_iter_count_10mib_values
  total:
    instructions: 544.09 K (regressed by 3.63%)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_4_1024
  total:
    instructions: 730.55 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_4_1024_v2
  total:
    instructions: 832.33 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_8_1024
  total:
    instructions: 958.33 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_8_1024_v2
  total:
    instructions: 1.08 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_16_1024
  total:
    instructions: 1.18 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_16_1024_v2
  total:
    instructions: 1.31 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_32_1024
  total:
    instructions: 1.26 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_32_1024_v2
  total:
    instructions: 1.40 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_64_1024
  total:
    instructions: 1.58 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_64_1024_v2
  total:
    instructions: 1.72 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_128_1024
  total:
    instructions: 1.92 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_128_1024_v2
  total:
    instructions: 2.06 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_256_1024
  total:
    instructions: 2.56 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_256_1024_v2
  total:
    instructions: 2.72 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_512_1024
  total:
    instructions: 3.93 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_512_1024_v2
  total:
    instructions: 4.08 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_u64_u64
  total:
    instructions: 634.57 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_u64_u64_v2
  total:
    instructions: 739.94 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_u64_blob_8
  total:
    instructions: 609.38 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_u64_blob_8_v2
  total:
    instructions: 705.69 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_8_u64
  total:
    instructions: 549.47 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_8_u64_v2
  total:
    instructions: 685.61 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_4_1024
  total:
    instructions: 252.12 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_4_1024_v2
  total:
    instructions: 335.50 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_8_1024
  total:
    instructions: 292.70 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_8_1024_v2
  total:
    instructions: 375.37 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_16_1024
  total:
    instructions: 372.17 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_16_1024_v2
  total:
    instructions: 457.66 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_32_1024
  total:
    instructions: 419.06 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_32_1024_v2
  total:
    instructions: 504.37 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_64_1024
  total:
    instructions: 668.07 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_64_1024_v2
  total:
    instructions: 753.61 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_128_1024
  total:
    instructions: 907.60 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_128_1024_v2
  total:
    instructions: 1.01 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_256_1024
  total:
    instructions: 1.43 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_256_1024_v2
  total:
    instructions: 1.53 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_512_1024
  total:
    instructions: 2.46 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_512_1024_v2
  total:
    instructions: 2.56 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_u64_u64
  total:
    instructions: 241.23 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_u64_u64_v2
  total:
    instructions: 305.67 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_u64_blob_8
  total:
    instructions: 238.33 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_u64_blob_8_v2
  total:
    instructions: 297.68 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_8_u64
  total:
    instructions: 257.17 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_8_u64_v2
  total:
    instructions: 340.84 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 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)

---------------------------------------------------

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 (-0.00%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 8320 pages (no change)

---------------------------------------------------

Benchmark: memory_manager_grow
  total:
    instructions: 350.73 M (-0.27%) (change within noise threshold)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 32.00 K pages (no change)

---------------------------------------------------

@dsarlis
Copy link
Member

dsarlis commented Nov 12, 2024

@hpeebles I do see some non-negligible regressions in iter benchmarks (both for smaller and larger values). Do you think we could maybe do something to make them a bit better?

@dsarlis dsarlis self-requested a review November 12, 2024 09:04
@dsarlis dsarlis dismissed their stale review November 12, 2024 09:06

Benchmarks show some regression that we should look into.

@hpeebles
Copy link
Contributor Author

@hpeebles I do see some non-negligible regressions in iter benchmarks (both for smaller and larger values). Do you think we could maybe do something to make them a bit better?

Yeah I don't think it was 36% when I originally ran them a few commits ago so I'll have a play around to see where that got added.

dsarlis
dsarlis previously approved these changes Nov 12, 2024
@dsarlis dsarlis merged commit 6688005 into dfinity:main Nov 12, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants