Releases: dfinity/stable-structures
v0.7.2
Summary
- feat: add
first()andlast()methods toLogstable structure - ci: fixed slackapi integration
- revert: yanked v0.7.1: manual virtual memory release
What's Changed
- chore(deps): bump dawidd6/action-download-artifact from 9 to 11 by @dependabot[bot] in #347
- chore(deps): bump slackapi/slack-github-action from 1.25.0 to 2.1.1 by @dependabot[bot] in #373
- chore: Revert "chore(deps): bump slackapi/slack-github-action from 1.25.0 to 2.1.1" by @maksymar in #384
- docs: add AGENTS.md and mark deprecated APIs for cleanup by @maksymar in #383
- ci: fix slackapi v2.1.1 by @maksymar in #389
- chore(license): removes modified boilerplate from license file by @jwndlng in #395
- fix: fix backticks in github PR title like here
exampleby @maksymar in #399 - docs: add release guide by @maksymar in #401
- feat(log): add first() and last() methods by @sasa-tomic in #402
- chore(release): v0.7.2 by @maksymar in #403
Changes from yanked v0.7.1
- feat: add manual bucket release to prevent memory waste by @maksymar in #386
- docs: add safety documentation and tests for manual bucket release by @maksymar in #387
- docs: use reclaim_memory() name and update docs accordingly by @maksymar in #388
- docs: cleanup documentation by @maksymar in #391
- docs: update memory reclamation examples in the docs by @maksymar in #392
- chore(release): v0.7.1 by @maksymar in #393
- fix: use conservative bucket reuse that survives reload by @maksymar in #394
- fix: revert adding reclaim_memory to memory manager by @maksymar in #396
New Contributors
- @sasa-tomic made their first contribution in #402
Full Changelog: v0.7.0...v0.7.2
v0.7.0
Highlights
- Faster
BTreeMap: Fewer clones viainto_bytes(breaking API), lazy iterator (breaking API), faster traversal, batch read/write - Breaking API: Public methods now panic instead of returning
Result - Benchmarks: Improved coverage (NNS, I/O chunks, principals)
- Improved CI & Docs: Better logs, custom branches benchmark support, and updated documentation.
Migration Guide
To upgrade to v0.7.0, fix any build errors by applying the following changes:
- Implement
into_bytesfor your types to support the updated API - Update iteration logic: instead of
(key, value)tuples, iterate overentryobjects and useentry.key()andentry.value()to lazily access data - Remove
.unwrap()where methods no longer returnResult— these now panic on misuse
What's Changed
- Breaking API change
- perf!: remove excessive cloning in btreemap.insert (breaking API change) by @maksymar in #322
- refactor!: replace Result with panic in stable-structures (breaking API change) API by @maksymar in #351
- feat!: add lazy BTreeMap iterator for improved performance (breaking API change) by @maksymar in #375
- Performance improvements
- perf: batch allocate overflow pages in BTreeMap by @maksymar in #357
- perf: speed up iter, range, scan methods with Rc by @maksymar in #356
- perf: use Box instead of Rc in BTreeMap iterator by @maksymar in #360
- perf: faster node traversal and entry extraction in BTreeMap by @maksymar in #363
- perf: add batch read of BTreeMap node children addresses by @maksymar in #364
- perf: add batch write of BTreeMap node children addresses by @maksymar in #365
- Tests and benchmarks
- test: add API conformance tests by @maksymar in #346
- test: fix compare benchmarks by @maksymar in #358
- test: add nns_vote_cascading benchmarks by @maksymar in #371
- test: add benchmarks with principal by @maksymar in #374
- test: rename 'compare' benchmark to 'io_chunks' for clarity by @maksymar in #368
- Docs
- CI & chores
- ci: enable colored CI logs and fix lifetime warnings by @maksymar in #353
- ci: sanitize PR name in Slack notification messages like <&test> by @maksymar in #359
- ci: rename 'main' to 'baseline' to support custom benchmark branches by @maksymar in #366
- ci: re-enable io_chunks benchmark by @maksymar in #369
- ci: enable nns benchmarks by @maksymar in #372
- ci: upload persisted canbench_results.yml file by @maksymar in #376
- chore: fix typos and improve wording by @maksymar in #370
- chore: fix typos by @maksymar in #377
- chore: bump version to v0.7.0 by @maksymar in #379
Full Changelog: v0.6.9...v0.7.0
Benchmarks Diff v0.7.0 vs v0.6.7 (before optimizations)
Google sheets CSV reports link.
Measurements done here.
btreemap
---------------------------------------------------
Summary:
instructions:
status: Regressions and improvements 🔴🟢
counts: [total 303 | regressed 24 | improved 203 | new 0 | unchanged 76]
change: [max +883.02M | p75 -2.11M | median -26.90M | p25 -132.45M | min -1.77B]
change %: [max +13.63% | p75 -0.69% | median -5.16% | p25 -13.61% | min -98.33%]
heap_increase:
status: Improvements detected 🟢
counts: [total 303 | regressed 0 | improved 1 | new 0 | unchanged 302]
change: [max 0 | p75 0 | median 0 | p25 0 | min -161]
change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min -50.00%]
stable_memory_increase:
status: No significant changes 👍
counts: [total 303 | regressed 0 | improved 0 | new 0 | unchanged 303]
change: [max 0 | p75 0 | median 0 | p25 0 | min 0]
change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]
---------------------------------------------------
Only significant changes:
| status | name | calls | ins | ins Δ% | HI | HI Δ% | SMI | SMI Δ% |
|--------|----------------------------------------------|-------|---------|---------|----|--------|-----|---------|
| + | btreemap_v2_remove_blob_1024_128 | | 7.36B | +13.63% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_blob_512_128 | | 4.07B | +12.87% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_blob_256_128 | | 2.42B | +9.99% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_blob_128_128 | | 1.59B | +7.88% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_insert_blob_1024_128 | | 5.50B | +7.61% | 0 | 0.00% | 196 | 0.00% |
| + | btreemap_v2_insert_blob_512_128 | | 3.04B | +6.39% | 0 | 0.00% | 111 | 0.00% |
| + | btreemap_v2_insert_blob_256_128 | | 1.79B | +6.03% | 0 | 0.00% | 67 | 0.00% |
| + | btreemap_v2_scan_keys_1k_10kib | | 2.50M | +4.37% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_vec_32_64 | | 968.31M | +4.12% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_scan_keys_rev_1k_10kib | | 2.48M | +3.85% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_insert_blob_128_128 | | 1.18B | +3.84% | 0 | 0.00% | 46 | 0.00% |
| + | btreemap_v2_scan_keys_1k_0b | | 982.66K | +3.82% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_vec_32_16 | | 871.33M | +3.65% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_insert_blob_32_0 | | 490.46M | +3.61% | 0 | 0.00% | 8 | 0.00% |
| + | btreemap_v2_remove_blob_32_0 | | 654.25M | +3.01% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_vec_32_0 | | 834.33M | +2.53% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_vec_32_32 | | 867.57M | +2.41% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_insert_blob_32_64 | | 534.92M | +2.28% | 0 | 0.00% | 18 | 0.00% |
| + | btreemap_v2_insert_blob_32_32 | | 528.95M | +2.21% | 0 | 0.00% | 13 | 0.00% |
| + | btreemap_v2_insert_principal | | 503.31M | +2.20% | 0 | 0.00% | 8 | 0.00% |
| + | btreemap_v2_get_vec_16_128 | | 449.74M | +2.16% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_scan_keys_rev_1k_0b | | 984.22K | +2.13% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_insert_blob_32_8 | | 517.59M | +2.05% | 0 | 0.00% | 9 | 0.00% |
| + | btreemap_v2_remove_vec_32_8 | | 856.48M | +2.04% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_pop_first_blob_32_512 | | 957.57M | -2.13% | 0 | 0.00% | 0 | 0.00% |
| ... | ... 177 rows omitted ... | | | | | | | |
| - | btreemap_v2_mem_manager_insert_vec512_u64 | | 1.96B | -41.01% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_mem_manager_remove_u64_vec512 | | 1.22B | -45.51% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_mem_manager_insert_u64_vec512 | | 834.10M | -46.42% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_mem_manager_remove_u64_blob512 | | 882.97M | -47.67% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_mem_manager_insert_u64_blob512 | | 607.29M | -47.87% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_mem_manager_insert_u64_u64 | | 520.55M | -48.55% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_mem_manager_remove_u64_u64 | | 736.79M | -48.55% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_mem_manager_get_u64_vec512 | | 388.83M | -51.10% | 0 | 0.00% | 0 | 0.00% |
| - | btreemap_v2_mem_manager_c...
v0.6.9
Highlights
- Performance: Improved
BTreeMapperformance (lazy key loading for big keys >16 bytes)- Better benchmarks, improved coverage
- New: added
BTreeSetdata structure - Documentation: stable-structures book now published
- Cleanup & CI: internal refactors and improved CI
What's Changed
- perf: improve contains_key performance by @maksymar in #271
- ci: add emojis for visualization to top-level canbench summary by @maksymar in #275
- chore: cleanup benchmarks by @maksymar in #276
- chore: btreemap code cleanup by @maksymar in #277
- test: add multi‑type key/value support to BTreeMap tests by @maksymar in #283
- chore: BTreeMap tests cleanup by @maksymar in #287
- docs: improved documentation for BTreeMap by @ielashi in #284
- docs: add skeleton for stable structures book by @ielashi in #289
- feat: Add stable B tree set in stable structures by @dragoljub-duric in #204
- feat: Add new BTreeSet functions by @dragoljub-duric in #292
- chore: Add computational complexity to doc comments of BTreeSet functions by @dragoljub-duric in #293
- docs: add memory trait and memory manager documentation to book by @ielashi in #290
- chore: Update docs for BTreeSet by @dragoljub-duric in #297
- chore: add mdbook github workflow by @ielashi in #291
- feat: publish stable structures book to github pages by @ielashi in #298
- fix: broken link in memory manager doc by @ielashi in #299
- chore: update canbench-rs to 0.1.11 by @maksymar in #302
- ci: update canbench to 0.1.12 by @maksymar in #301
- ci: upgrade canbench to v0.1.13 by @maksymar in #303
- fix: Use correct feature name for canbench profiling by @dsarlis in #296
- chore: bump canbench version to 0.1.14 by @maksymar in #304
- test: improve BTreeMap bench coverage and readability by @maksymar in #285
- chore: update rust dependencies to canbench v0.1.14 by @maksymar in #305
- feat: add optional bench_scope feature for stable-structures by @maksymar in #308
- chore: cleanup deps by @maksymar in #307
- refactor: prepare for lazy key loading by @maksymar in #310
- chore: add workflow for slack notifications by @mraszyk in #311
- perf: Inline from_bytes by @frankdavid in #313
- fix: do not trigger slack notification upon adding reviewers by @mraszyk in #314
- fix: gh pages publish dir by @marc0olo in #309
- feat: add lazy loading for large BTreeMap keys by @maksymar in #312
- ci: add repo name to slack message by @maksymar in #315
- ci: split benchmarks per type by @maksymar in #316
- chore: bump canbench version to 0.1.15 by @maksymar in #317
- fix: fix dependency for bench_scope feature in benchmarks by @maksymar in #320
- test: add benchmarks to compare stable memory vs btreemap performance by @maksymar in #319
- refactor: rename FixedVec to UnboundedVecN by @maksymar in #325
- test: add stable Vec benchmarks by @maksymar in #324
- chore: refactor storable/tuples for better readability by @maksymar in #323
- chore(deps): bump slackapi/slack-github-action from 1.25.0 to 2.1.0 by @dependabot in #321
- chore: Revert "chore(deps): bump slackapi/slack-github-action from 1.25.0 to 2.1.0" by @dsarlis in #328
- fix: use cargo build locked to remove noise from canbench measurements by @maksymar in #327
- chore: fix compilation warning by @maksymar in #330
- fix: fix canbench stability by locking its dependencies by @maksymar in #332
- perf: optimize value swap in BTreeMap by @maksymar in #333
- refactor: improve naming of BTreeMap inner key/value storage by @maksymar in #334
- chore: bump canbench version to v0.1.16 by @maksymar in #335
- refactor: relocate vec types for benchmarks by @maksymar in #336
- perf: use size with offset in lazy loading BTreeMap items by @maksymar in #337
- perf: Introduce benchmarks for the BTreeSet data structure by @dragoljub-duric in #340
- chore: Add CI job for BTreeSet benchmarks by @dragoljub-duric in #341
- chore: bump canbench version to v0.1.17 by @maksymar in #342
- chore: bump canbench version to v0.2.0 by @maksymar in #343
- chore: bump dependency versions by @maksymar in #344
- chore: bump version to v0.6.9 by @maksymar in #345
New Contributors
- @maksymar made their first contribution in #271
- @mraszyk made their first contribution in #311
- @marc0olo made their first contribution in #309
Full Changelog: v0.6.8...v0.6.9
Benchmarks Diff v0.6.9 vs v0.6.7
Google sheets CSV reports link. All CSV files provided in assets section below.
btreemap
---------------------------------------------------
Summary:
instructions:
status: Regressions and improvements 🔴🟢
counts: [total 285 | regressed 50 | improved 134 | new 0 | unchanged 101]
change: [max +899.01M | p75 +4.24M | median -8.50M | p25 -99.48M | min -1.78B]
change %: [max +26.15% | p75 +0.94% | median -1.49% | p25 -9.79% | min -88.41%]
heap_increase:
status: No significant changes 👍
counts: [total 285 | regressed 0 | improved 0 | new 0 | unchanged 285]
change: [max 0 | p75 0 | median 0 | p25 0 | min 0]
change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]
stable_memory_increase:
status: No significant changes 👍
counts: [total 285 | regressed 0 | improved 0 | new 0 | unchanged 285]
change: [max 0 | p75 0 | median 0 | p25 0 | min 0]
change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]
---------------------------------------------------
Only significant changes:
| status | name | calls | ins | ins Δ% | HI | HI Δ% | SMI | SMI Δ% |
|--------|---------------------------------------------|-------|---------|---------|----|--------|-----|---------|
| + | btreemap_v2_scan_keys_1k_0b | | 1.19M | +26.15% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_scan_keys_rev_1k_0b | | 1.19M | +23.88% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_blob_1024_128 | | 7.38B | +13.87% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_blob_512_128 | | 4.09B | +13.32% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_mem_manager_remove_blob512_u64 | | 4.35B | +12.87% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_blob_256_128 | | 2.44B | +10.74% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_scan_keys_1k_10kib | | 2.60M | +10.32% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_scan_keys_rev_1k_10kib | | 2.58M | +9.59% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_remove_blob_128_128 | | 1.61B | +9.15% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_range_count_1k_10kib | | 2.65M | +8.67% | 0 | 0.00% | 0 | 0.00% |
| + | btreemap_v2_...
v0.6.8
What's Changed
- chore: Bump Rust version to 1.78 in rust-toolchain by @frankdavid in #254
- test: Add a few new benchmarks that exercise the MemoryManager which is often how StableStructures are used by @frankdavid in #253
- perf: Replace BTreeMap with constant vector in MemoryManager by @frankdavid in #240
- perf: Support read_unsafe in VirtualMemory and RestrictedMemory by @frankdavid in #256
- chore: Format canbench output so diffs can be seen more easily by @frankdavid in #257
- test: Add stability tests for MemoryManager by @frankdavid in #259
- perf: Replace BucketIterator with function by @frankdavid in #258
- chore(deps): bump dawidd6/action-download-artifact from 6 to 7 by @dependabot in #255
- chore: fix typo by @cuiyourong in #261
- perf: Add bucket cache in MemoryManager by @frankdavid in #260
- chore(deps): bump dawidd6/action-download-artifact from 7 to 8 by @dependabot in #262
- chore: Add a SECURITY.md policy by @dsarlis in #265
- ci: Upgrade Rust toolchain to 1.84 by @berestovskyy in #268
- chore(deps): bump dawidd6/action-download-artifact from 8 to 9 by @dependabot in #267
- chore: bump version to v0.6.8 by @berestovskyy in #269
New Contributors
- @cuiyourong made their first contribution in #261
- @berestovskyy made their first contribution in #268
Full Changelog: v0.6.7...v0.6.8
v0.6.7
Overview
This release brings in significant performance improvements in various stable structures. There are also some small features included, like the addition of keys and values on StableBTreeMap as well as fix for StableVec.
What's Changed
- feat: implement
keysandvaluesonStableBTreeMapby @hpeebles in #241 - perf: Optimize how values are stored and handled by @frankdavid in #237
- test: Add two new benchmarks for benchmarking situations where not every value is read by @frankdavid in #243
- perf: Refactor the internal Value data structure and make some performance improvements by @frankdavid in #245
- perf: Add inline hint to Ic0StableMemory methods by @frankdavid in #247
- perf: Add new efficient APIs read_unsafe and read_to_vec by @frankdavid in #248
- fix: Fix Vec Iter::count() after next_back() by @frankdavid in #250
- chore: bump version to 0.6.7 by @dsarlis in #252
Full Changelog: v0.6.6...v0.6.7
v0.6.6
Overview
This release adds the ability to iterate backwards in a StableBTreeMap. Additionally includes some other small changes, like bumping some dependency versions and fixing a problem with posting the comment about benchmarks on PRs.
What's Changed
- chore(deps): bump dawidd6/action-download-artifact from 3.1.4 to 6 by @dependabot in #225
- chore: upgrade canbench from 0.1.1 to 0.1.7 by @ielashi in #232
- chore(deps): bump thollander/actions-comment-pull-request from 2 to 3 by @dependabot in #230
- feat: move initialization of
StableBTreeMapcursors intoIterby @hpeebles in #231 - fix: Fix arg names in post-comment action by @frankdavid in #238
- feat: implement
DoubleEndedIteratorforStableBTreeMapby @hpeebles in #235 - chore: bump version to 0.6.6 by @dsarlis in #239
New Contributors
- @frankdavid made their first contribution in #238
Full Changelog: v0.6.5...v0.6.6
v0.6.5
v0.6.4
Overview
This new release addresses a minor memory issue in BTreeMap and expands its support for tuples.
What's Changed
- feat: Implement Storable for three elements tuples by @dragoljub-duric in #202
- feat: Implement into_memory for memory manager by @bitdivine in #188
- fix: BTreeMap memory issue when deallocating nodes with overflows by @ielashi in #212
Full Changelog: v0.6.3...v0.6.4
v0.6.3
What's Changed
- docs: remove outdated precondition by @ielashi in #184
- feat: implement
storableforboolby @linnefromice in #186 - chore: Upgrade Rust version by @dragoljub-duric in #193
- perf: Add benchmarks for BtreeMap::Iterator::count() by @dragoljub-duric in #191
- feat: use canbench for benchmarks by @ielashi in #194
- perf: BTreeMap: make
range().count()more efficient by @dragoljub-duric in #190 - chore: Reimplement BTreeMap::clear() to not consume self by @dragoljub-duric in #198
New Contributors
- @linnefromice made their first contribution in #186
Full Changelog: v0.6.2...v0.6.3