diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a23ff5e..e2be958f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,7 @@ jobs: matrix: name: - btreemap - - btreeset + # - btreeset - io_chunks - memory-manager - nns @@ -98,8 +98,8 @@ jobs: include: - name: btreemap project_dir: ./benchmarks/btreemap - - name: btreeset - project_dir: ./benchmarks/btreeset + # - name: btreeset + # project_dir: ./benchmarks/btreeset - name: io_chunks project_dir: ./benchmarks/io_chunks - name: memory-manager diff --git a/Cargo.lock b/Cargo.lock index 992e9c72..2020e349 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,7 +28,7 @@ dependencies = [ "candid", "ic-cdk", "ic-cdk-macros", - "ic-stable-structures", + "ic-stable-structures 0.6.7", "maplit", "serde", "tiny-rng", @@ -300,6 +300,15 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "ic-stable-structures" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b492c5a16455ae78623eaa12ead96dda6c69a83c535b1b00789f19b381c8a24c" +dependencies = [ + "ic_principal", +] + [[package]] name = "ic-stable-structures" version = "0.6.9" diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 05e3b51d..74f9f5c5 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -10,7 +10,8 @@ canbench-rs.workspace = true candid.workspace = true ic-cdk-macros.workspace = true ic-cdk.workspace = true -ic-stable-structures = { path = "../", features = [] } +#ic-stable-structures = { path = "../", features = [] } +ic-stable-structures = { version = "=0.6.7", features = [] } maplit.workspace = true serde.workspace = true tiny-rng.workspace = true @@ -22,9 +23,9 @@ path = "src/lib.rs" name = "btreemap" path = "btreemap/src/main.rs" -[[bin]] -name = "btreeset" -path = "btreeset/src/main.rs" +# [[bin]] +# name = "btreeset" +# path = "btreeset/src/main.rs" [[bin]] name = "io_chunks" diff --git a/benchmarks/btreemap/canbench_results.yml b/benchmarks/btreemap/canbench_results.yml index 2dabed3e..2434df0f 100644 --- a/benchmarks/btreemap/canbench_results.yml +++ b/benchmarks/btreemap/canbench_results.yml @@ -2,2121 +2,2121 @@ benches: btreemap_v2_contains_10mib_values: total: calls: 1 - instructions: 142210325 + instructions: 1232256548 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob8_u64: total: calls: 1 - instructions: 277134712 + instructions: 297234517 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_1024_128: total: calls: 1 - instructions: 4278312217 + instructions: 4953752884 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_128_128: total: calls: 1 - instructions: 819285681 + instructions: 947215157 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_16_128: total: calls: 1 - instructions: 293742975 + instructions: 317383138 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_256_128: total: calls: 1 - instructions: 1310685287 + instructions: 1507459935 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_0: total: calls: 1 - instructions: 329571719 + instructions: 344274416 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_1024: total: calls: 1 - instructions: 326072097 + instructions: 353784908 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_128: total: calls: 1 - instructions: 326242314 + instructions: 345922867 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_16: total: calls: 1 - instructions: 318823973 + instructions: 346982140 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_256: total: calls: 1 - instructions: 324026367 + instructions: 351608924 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_32: total: calls: 1 - instructions: 330971981 + instructions: 348918242 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_4: total: calls: 1 - instructions: 323046095 + instructions: 343502346 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_512: total: calls: 1 - instructions: 321643229 + instructions: 348958433 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_64: total: calls: 1 - instructions: 324885334 + instructions: 347148308 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_32_8: total: calls: 1 - instructions: 324308878 + instructions: 345343736 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_4_128: total: calls: 1 - instructions: 243884967 + instructions: 257172365 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_512_128: total: calls: 1 - instructions: 2281494289 + instructions: 2659940795 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_64_128: total: calls: 1 - instructions: 403270584 + instructions: 601803500 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_blob_8_128: total: calls: 1 - instructions: 268086207 + instructions: 281668850 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_principal: total: calls: 1 - instructions: 349062610 + instructions: 367818918 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_u64_blob8: total: calls: 1 - instructions: 219629119 + instructions: 245146239 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_u64_u64: total: calls: 1 - instructions: 223284326 + instructions: 249091801 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_u64_vec8: total: calls: 1 - instructions: 219629119 + instructions: 245921463 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec8_u64: total: calls: 1 - instructions: 374095890 + instructions: 376448551 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_1024_128: total: calls: 1 - instructions: 1817385622 + instructions: 2923063406 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_128_128: total: calls: 1 - instructions: 568150650 + instructions: 710848721 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_16_128: total: calls: 1 - instructions: 442851826 + instructions: 440230995 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_256_128: total: calls: 1 - instructions: 896432175 + instructions: 1233502146 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_0: total: calls: 1 - instructions: 355321635 + instructions: 433279098 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_1024: total: calls: 1 - instructions: 520527229 + instructions: 607402920 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_128: total: calls: 1 - instructions: 428325937 + instructions: 498802933 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_16: total: calls: 1 - instructions: 367802150 + instructions: 416528373 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_256: total: calls: 1 - instructions: 433045196 + instructions: 539891346 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_32: total: calls: 1 - instructions: 355276471 + instructions: 416598030 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_4: total: calls: 1 - instructions: 352561298 + instructions: 414698746 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_512: total: calls: 1 - instructions: 454924839 + instructions: 559055930 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_64: total: calls: 1 - instructions: 398356880 + instructions: 471856917 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_32_8: total: calls: 1 - instructions: 352626675 + instructions: 414659506 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_4_128: total: calls: 1 - instructions: 404252150 + instructions: 406946304 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_512_128: total: calls: 1 - instructions: 1246829046 + instructions: 1826131332 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_64_128: total: calls: 1 - instructions: 493185629 + instructions: 606186209 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_contains_vec_8_128: total: calls: 1 - instructions: 396603085 + instructions: 398453025 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_10mib_values: total: calls: 1 - instructions: 388592804 + instructions: 1232256548 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob8_u64: total: calls: 1 - instructions: 299599641 + instructions: 297234517 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_1024_128: total: calls: 1 - instructions: 4457685507 + instructions: 4953752884 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_128_128: total: calls: 1 - instructions: 855273807 + instructions: 947215157 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_16_128: total: calls: 1 - instructions: 308463753 + instructions: 317383138 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_256_128: total: calls: 1 - instructions: 1367052477 + instructions: 1507459935 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_0: total: calls: 1 - instructions: 337429950 + instructions: 344274416 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_1024: total: calls: 1 - instructions: 350508333 + instructions: 353784908 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_128: total: calls: 1 - instructions: 341653262 + instructions: 345922867 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_16: total: calls: 1 - instructions: 330651190 + instructions: 346982140 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_256: total: calls: 1 - instructions: 342643724 + instructions: 351608924 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_32: total: calls: 1 - instructions: 342697250 + instructions: 348918242 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_4: total: calls: 1 - instructions: 334169026 + instructions: 343502346 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_512: total: calls: 1 - instructions: 342695399 + instructions: 348958433 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_64: total: calls: 1 - instructions: 336813935 + instructions: 347148308 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_32_8: total: calls: 1 - instructions: 335925065 + instructions: 345343736 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_4_128: total: calls: 1 - instructions: 254906111 + instructions: 257172365 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_512_128: total: calls: 1 - instructions: 2378828514 + instructions: 2659940795 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_64_128: total: calls: 1 - instructions: 428744853 + instructions: 601803500 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_blob_8_128: total: calls: 1 - instructions: 279716343 + instructions: 281668850 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_principal: total: calls: 1 - instructions: 356428202 + instructions: 367868908 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_u64_blob8: total: calls: 1 - instructions: 226446414 + instructions: 245196229 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_u64_u64: total: calls: 1 - instructions: 230534752 + instructions: 249141791 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_u64_vec8: total: calls: 1 - instructions: 226935610 + instructions: 245971453 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec8_u64: total: calls: 1 - instructions: 379651663 + instructions: 376448551 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_1024_128: total: calls: 1 - instructions: 1870806515 + instructions: 2923063406 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_128_128: total: calls: 1 - instructions: 577227038 + instructions: 710848721 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_16_128: total: calls: 1 - instructions: 449737724 + instructions: 440230995 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_256_128: total: calls: 1 - instructions: 905669607 + instructions: 1233502146 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_0: total: calls: 1 - instructions: 358216658 + instructions: 433279098 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_1024: total: calls: 1 - instructions: 544469486 + instructions: 607402920 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_128: total: calls: 1 - instructions: 436037967 + instructions: 498802933 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_16: total: calls: 1 - instructions: 373713570 + instructions: 416528373 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_256: total: calls: 1 - instructions: 447151619 + instructions: 539891346 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_32: total: calls: 1 - instructions: 361330699 + instructions: 416598030 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_4: total: calls: 1 - instructions: 358348309 + instructions: 414698746 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_512: total: calls: 1 - instructions: 472992093 + instructions: 559055930 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_64: total: calls: 1 - instructions: 404811886 + instructions: 471856917 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_32_8: total: calls: 1 - instructions: 358456622 + instructions: 414659506 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_4_128: total: calls: 1 - instructions: 411151875 + instructions: 406946304 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_512_128: total: calls: 1 - instructions: 1256149861 + instructions: 1826131332 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_64_128: total: calls: 1 - instructions: 501687251 + instructions: 606186209 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_get_vec_8_128: total: calls: 1 - instructions: 403496154 + instructions: 398453025 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_insert_10mib_values: total: calls: 1 - instructions: 4388592719 - heap_increase: 161 + instructions: 5263515760 + heap_increase: 322 stable_memory_increase: 3613 scopes: {} btreemap_v2_insert_blob8_u64: total: calls: 1 - instructions: 436633391 + instructions: 444168654 heap_increase: 0 stable_memory_increase: 4 scopes: {} btreemap_v2_insert_blob_1024_128: total: calls: 1 - instructions: 5496222167 + instructions: 5107494580 heap_increase: 0 stable_memory_increase: 196 scopes: {} btreemap_v2_insert_blob_128_128: total: calls: 1 - instructions: 1180838234 + instructions: 1137172325 heap_increase: 0 stable_memory_increase: 46 scopes: {} btreemap_v2_insert_blob_16_128: total: calls: 1 - instructions: 486249812 + instructions: 498148021 heap_increase: 0 stable_memory_increase: 24 scopes: {} btreemap_v2_insert_blob_256_128: total: calls: 1 - instructions: 1789038066 + instructions: 1687364788 heap_increase: 0 stable_memory_increase: 67 scopes: {} btreemap_v2_insert_blob_32_0: total: calls: 1 - instructions: 490459106 + instructions: 473380843 heap_increase: 0 stable_memory_increase: 8 scopes: {} btreemap_v2_insert_blob_32_1024: total: calls: 1 - instructions: 703500065 + instructions: 690575465 heap_increase: 0 stable_memory_increase: 173 scopes: {} btreemap_v2_insert_blob_32_128: total: calls: 1 - instructions: 542568143 + instructions: 532564952 heap_increase: 0 stable_memory_increase: 28 scopes: {} btreemap_v2_insert_blob_32_16: total: calls: 1 - instructions: 519117156 + instructions: 511907754 heap_increase: 0 stable_memory_increase: 11 scopes: {} btreemap_v2_insert_blob_32_256: total: calls: 1 - instructions: 570690137 + instructions: 563777889 heap_increase: 0 stable_memory_increase: 49 scopes: {} btreemap_v2_insert_blob_32_32: total: calls: 1 - instructions: 528951192 + instructions: 517495085 heap_increase: 0 stable_memory_increase: 13 scopes: {} btreemap_v2_insert_blob_32_4: total: calls: 1 - instructions: 509380036 + instructions: 500062518 heap_increase: 0 stable_memory_increase: 8 scopes: {} btreemap_v2_insert_blob_32_512: total: calls: 1 - instructions: 610063051 + instructions: 601020517 heap_increase: 0 stable_memory_increase: 91 scopes: {} btreemap_v2_insert_blob_32_64: total: calls: 1 - instructions: 534921249 + instructions: 522977116 heap_increase: 0 stable_memory_increase: 18 scopes: {} btreemap_v2_insert_blob_32_8: total: calls: 1 - instructions: 517593840 + instructions: 507190171 heap_increase: 0 stable_memory_increase: 9 scopes: {} btreemap_v2_insert_blob_4_128: total: calls: 1 - instructions: 407268940 + instructions: 413447655 heap_increase: 0 stable_memory_increase: 13 scopes: {} btreemap_v2_insert_blob_512_128: total: calls: 1 - instructions: 3041223382 + instructions: 2858550807 heap_increase: 0 stable_memory_increase: 111 scopes: {} btreemap_v2_insert_blob_64_128: total: calls: 1 - instructions: 661179485 + instructions: 781011549 heap_increase: 0 stable_memory_increase: 34 scopes: {} btreemap_v2_insert_blob_8_128: total: calls: 1 - instructions: 458615568 + instructions: 466239267 heap_increase: 0 stable_memory_increase: 20 scopes: {} btreemap_v2_insert_principal: total: calls: 1 - instructions: 503308324 + instructions: 492469347 heap_increase: 0 stable_memory_increase: 8 scopes: {} btreemap_v2_insert_u64_blob8: total: calls: 1 - instructions: 406744693 + instructions: 425410510 heap_increase: 0 stable_memory_increase: 5 scopes: {} btreemap_v2_insert_u64_u64: total: calls: 1 - instructions: 414580548 + instructions: 434291647 heap_increase: 0 stable_memory_increase: 6 scopes: {} btreemap_v2_insert_u64_vec8: total: calls: 1 - instructions: 410372254 + instructions: 432679797 heap_increase: 0 stable_memory_increase: 21 scopes: {} btreemap_v2_insert_vec8_u64: total: calls: 1 - instructions: 594103663 + instructions: 584915188 heap_increase: 0 stable_memory_increase: 16 scopes: {} btreemap_v2_insert_vec_1024_128: total: calls: 1 - instructions: 2744606200 + instructions: 3326128535 heap_increase: 0 stable_memory_increase: 193 scopes: {} btreemap_v2_insert_vec_128_128: total: calls: 1 - instructions: 1012643373 + instructions: 1100050350 heap_increase: 0 stable_memory_increase: 51 scopes: {} btreemap_v2_insert_vec_16_128: total: calls: 1 - instructions: 708997439 + instructions: 706779127 heap_increase: 0 stable_memory_increase: 31 scopes: {} btreemap_v2_insert_vec_256_128: total: calls: 1 - instructions: 1402219761 + instructions: 1511633177 heap_increase: 0 stable_memory_increase: 71 scopes: {} btreemap_v2_insert_vec_32_0: total: calls: 1 - instructions: 621849784 + instructions: 623601435 heap_increase: 0 stable_memory_increase: 20 scopes: {} btreemap_v2_insert_vec_32_1024: total: calls: 1 - instructions: 1182132701 + instructions: 1228355429 heap_increase: 0 stable_memory_increase: 171 scopes: {} btreemap_v2_insert_vec_32_128: total: calls: 1 - instructions: 756106158 + instructions: 765359838 heap_increase: 0 stable_memory_increase: 33 scopes: {} btreemap_v2_insert_vec_32_16: total: calls: 1 - instructions: 666191903 + instructions: 666452895 heap_increase: 0 stable_memory_increase: 20 scopes: {} btreemap_v2_insert_vec_32_256: total: calls: 1 - instructions: 869225881 + instructions: 894737713 heap_increase: 0 stable_memory_increase: 54 scopes: {} btreemap_v2_insert_vec_32_32: total: calls: 1 - instructions: 661645394 + instructions: 669336513 heap_increase: 0 stable_memory_increase: 20 scopes: {} btreemap_v2_insert_vec_32_4: total: calls: 1 - instructions: 660354036 + instructions: 663509349 heap_increase: 0 stable_memory_increase: 20 scopes: {} btreemap_v2_insert_vec_32_512: total: calls: 1 - instructions: 973664463 + instructions: 1013750419 heap_increase: 0 stable_memory_increase: 91 scopes: {} btreemap_v2_insert_vec_32_64: total: calls: 1 - instructions: 691643081 + instructions: 695415430 heap_increase: 0 stable_memory_increase: 24 scopes: {} btreemap_v2_insert_vec_32_8: total: calls: 1 - instructions: 659845953 + instructions: 663263091 heap_increase: 0 stable_memory_increase: 20 scopes: {} btreemap_v2_insert_vec_4_128: total: calls: 1 - instructions: 604355928 + instructions: 611688358 heap_increase: 0 stable_memory_increase: 16 scopes: {} btreemap_v2_insert_vec_512_128: total: calls: 1 - instructions: 1859161681 + instructions: 2133502127 heap_increase: 0 stable_memory_increase: 112 scopes: {} btreemap_v2_insert_vec_64_128: total: calls: 1 - instructions: 846320282 + instructions: 884314994 heap_increase: 0 stable_memory_increase: 41 scopes: {} btreemap_v2_insert_vec_8_128: total: calls: 1 - instructions: 666289233 + instructions: 669658886 heap_increase: 0 stable_memory_increase: 23 scopes: {} btreemap_v2_mem_manager_contains_blob512_u64: total: calls: 1 - instructions: 2349312653 + instructions: 3390506865 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_contains_u64_blob512: total: calls: 1 - instructions: 278855238 + instructions: 658722092 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_contains_u64_u64: total: calls: 1 - instructions: 283522171 + instructions: 652595590 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_contains_u64_vec512: total: calls: 1 - instructions: 367041614 + instructions: 795106876 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_contains_vec512_u64: total: calls: 1 - instructions: 1201243952 + instructions: 2718213103 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_get_blob512_u64: total: calls: 1 - instructions: 2458034243 + instructions: 3390506865 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_get_u64_blob512: total: calls: 1 - instructions: 295406794 + instructions: 658772082 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_get_u64_u64: total: calls: 1 - instructions: 291718588 + instructions: 652645580 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_get_u64_vec512: total: calls: 1 - instructions: 388831325 + instructions: 795156866 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_get_vec512_u64: total: calls: 1 - instructions: 1242312078 + instructions: 2718213103 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_insert_blob512_u64: total: calls: 1 - instructions: 3127680452 + instructions: 3743424060 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_insert_u64_blob512: total: calls: 1 - instructions: 607288370 + instructions: 1165029794 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_insert_u64_u64: total: calls: 1 - instructions: 520545864 + instructions: 1011655253 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_insert_u64_vec512: total: calls: 1 - instructions: 834100595 + instructions: 1556832558 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_insert_vec512_u64: total: calls: 1 - instructions: 1964405448 + instructions: 3330053164 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_blob512_u64: total: calls: 1 - instructions: 4310221225 + instructions: 4863214856 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_u64_blob512: total: calls: 1 - instructions: 882970074 + instructions: 1687266745 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_u64_u64: total: calls: 1 - instructions: 736785650 + instructions: 1431911622 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_u64_vec512: total: calls: 1 - instructions: 1223804753 + instructions: 2245857975 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_vec512_u64: total: calls: 1 - instructions: 3084565257 + instructions: 4694378571 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob8_u64: total: calls: 1 - instructions: 599256189 + instructions: 612637726 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_1024_128: total: calls: 1 - instructions: 8387602842 + instructions: 9403602074 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_128_128: total: calls: 1 - instructions: 1824725965 + instructions: 2012745025 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_16_128: total: calls: 1 - instructions: 743084112 + instructions: 762244836 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_256_128: total: calls: 1 - instructions: 2763911828 + instructions: 3099173745 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_0: total: calls: 1 - instructions: 751497584 + instructions: 765239581 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_1024: total: calls: 1 - instructions: 1121481321 + instructions: 1137621068 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_128: total: calls: 1 - instructions: 860285162 + instructions: 881580697 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_16: total: calls: 1 - instructions: 795095715 + instructions: 825039735 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_256: total: calls: 1 - instructions: 891739804 + instructions: 912682613 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_32: total: calls: 1 - instructions: 808560505 + instructions: 836752818 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_4: total: calls: 1 - instructions: 778864648 + instructions: 807238947 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_512: total: calls: 1 - instructions: 957571175 + instructions: 978415032 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_64: total: calls: 1 - instructions: 817406508 + instructions: 843819768 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_8: total: calls: 1 - instructions: 796779002 + instructions: 823680178 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_4_128: total: calls: 1 - instructions: 371435725 + instructions: 374753391 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_512_128: total: calls: 1 - instructions: 4613700344 + instructions: 5177641738 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_64_128: total: calls: 1 - instructions: 1031695256 + instructions: 1334172060 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_8_128: total: calls: 1 - instructions: 604976184 + instructions: 615550421 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_principal: total: calls: 1 - instructions: 800191973 + instructions: 818208250 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_u64_blob8: total: calls: 1 - instructions: 669276877 + instructions: 709587118 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_u64_u64: total: calls: 1 - instructions: 681264462 + instructions: 721760304 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_u64_vec8: total: calls: 1 - instructions: 671829217 + instructions: 713886897 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec8_u64: total: calls: 1 - instructions: 782876135 + instructions: 786067064 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_1024_128: total: calls: 1 - instructions: 4049265076 + instructions: 5774360526 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_128_128: total: calls: 1 - instructions: 1503218744 + instructions: 1822592852 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_16_128: total: calls: 1 - instructions: 1024772148 + instructions: 1029340405 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_256_128: total: calls: 1 - instructions: 2019891066 + instructions: 2536834838 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_0: total: calls: 1 - instructions: 862946599 + instructions: 974483456 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_1024: total: calls: 1 - instructions: 1689829372 + instructions: 1821110063 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_128: total: calls: 1 - instructions: 1088869698 + instructions: 1210407424 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_16: total: calls: 1 - instructions: 928270806 + instructions: 1043936196 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_256: total: calls: 1 - instructions: 1215466767 + instructions: 1332974747 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_32: total: calls: 1 - instructions: 931028208 + instructions: 1060127052 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_4: total: calls: 1 - instructions: 914745699 + instructions: 1042894770 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_512: total: calls: 1 - instructions: 1373268399 + instructions: 1497474534 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_64: total: calls: 1 - instructions: 972735601 + instructions: 1094600811 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_8: total: calls: 1 - instructions: 924967663 + instructions: 1054863180 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_4_128: total: calls: 1 - instructions: 540984708 + instructions: 540187920 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_512_128: total: calls: 1 - instructions: 2716330411 + instructions: 3609112133 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_64_128: total: calls: 1 - instructions: 1234556907 + instructions: 1408036844 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_8_128: total: calls: 1 - instructions: 850734232 + instructions: 849676601 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob8_u64: total: calls: 1 - instructions: 575661530 + instructions: 596713170 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_1024_128: total: calls: 1 - instructions: 8055247791 + instructions: 9225090237 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_128_128: total: calls: 1 - instructions: 1755509118 + instructions: 1963854241 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_16_128: total: calls: 1 - instructions: 716556083 + instructions: 743449779 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_256_128: total: calls: 1 - instructions: 2669730307 + instructions: 3025917983 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_0: total: calls: 1 - instructions: 723335313 + instructions: 751234178 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_1024: total: calls: 1 - instructions: 1085450731 + instructions: 1117727568 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_128: total: calls: 1 - instructions: 825902306 + instructions: 859561968 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_16: total: calls: 1 - instructions: 766901397 + instructions: 803941467 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_256: total: calls: 1 - instructions: 860879651 + instructions: 891833214 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_32: total: calls: 1 - instructions: 775936416 + instructions: 815908841 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_4: total: calls: 1 - instructions: 755124599 + instructions: 792942864 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_512: total: calls: 1 - instructions: 932320719 + instructions: 960363768 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_64: total: calls: 1 - instructions: 791545690 + instructions: 825771153 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_8: total: calls: 1 - instructions: 768161716 + instructions: 803089269 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_4_128: total: calls: 1 - instructions: 357885021 + instructions: 366420283 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_512_128: total: calls: 1 - instructions: 4444567386 + instructions: 5058787287 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_64_128: total: calls: 1 - instructions: 999738711 + instructions: 1312303657 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_8_128: total: calls: 1 - instructions: 598942864 + instructions: 615328673 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_principal: total: calls: 1 - instructions: 780291969 + instructions: 806659421 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_u64_blob8: total: calls: 1 - instructions: 645812582 + instructions: 697228011 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_u64_u64: total: calls: 1 - instructions: 657455588 + instructions: 709011799 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_u64_vec8: total: calls: 1 - instructions: 648268033 + instructions: 700292396 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec8_u64: total: calls: 1 - instructions: 759547094 + instructions: 767417717 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_1024_128: total: calls: 1 - instructions: 4254818123 + instructions: 6021963487 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_128_128: total: calls: 1 - instructions: 1509650210 + instructions: 1836490173 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_16_128: total: calls: 1 - instructions: 1006125814 + instructions: 1017562184 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_256_128: total: calls: 1 - instructions: 2073363853 + instructions: 2590130864 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_0: total: calls: 1 - instructions: 846109662 + instructions: 970571717 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_1024: total: calls: 1 - instructions: 1664437667 + instructions: 1815919730 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_128: total: calls: 1 - instructions: 1064611264 + instructions: 1209619435 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_16: total: calls: 1 - instructions: 902974455 + instructions: 1032810960 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_256: total: calls: 1 - instructions: 1193452039 + instructions: 1330429648 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_32: total: calls: 1 - instructions: 910490347 + instructions: 1048490533 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_4: total: calls: 1 - instructions: 898985596 + instructions: 1041262665 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_512: total: calls: 1 - instructions: 1356914135 + instructions: 1497777744 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_64: total: calls: 1 - instructions: 949782755 + instructions: 1089385972 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_8: total: calls: 1 - instructions: 902473492 + instructions: 1043077552 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_4_128: total: calls: 1 - instructions: 527064939 + instructions: 531321044 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_512_128: total: calls: 1 - instructions: 2808165041 + instructions: 3732073758 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_64_128: total: calls: 1 - instructions: 1220824533 + instructions: 1421526819 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_8_128: total: calls: 1 - instructions: 850619579 + instructions: 857309108 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_count_1k_0b: total: calls: 1 - instructions: 16962 + instructions: 16882 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_count_1k_10kib: total: calls: 1 - instructions: 2507196 + instructions: 2474482 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_count_20_10mib: total: calls: 1 - instructions: 18468765 + instructions: 21193758 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_key_sum_1k_0b: total: calls: 1 - instructions: 16933 + instructions: 17413 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_key_sum_1k_10kib: total: calls: 1 - instructions: 2572994 + instructions: 57289090 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_key_sum_20_10mib: total: calls: 1 - instructions: 18469999 + instructions: 1106447419 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_value_sum_1k_0b: total: calls: 1 - instructions: 17300 + instructions: 17427 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_value_sum_1k_10kib: total: calls: 1 - instructions: 20668618 + instructions: 57301086 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_range_value_sum_20_10mib: total: calls: 1 - instructions: 398305226 + instructions: 1106447655 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_10mib_values: total: calls: 1 - instructions: 4711118385 + instructions: 5589375808 heap_increase: 0 stable_memory_increase: 657 scopes: {} btreemap_v2_remove_blob8_u64: total: calls: 1 - instructions: 584636969 + instructions: 592796115 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_1024_128: total: calls: 1 - instructions: 7363800309 + instructions: 6480775657 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_128_128: total: calls: 1 - instructions: 1588756329 + instructions: 1472707385 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_16_128: total: calls: 1 - instructions: 665337905 + instructions: 686288150 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_256_128: total: calls: 1 - instructions: 2421697300 + instructions: 2201840807 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_0: total: calls: 1 - instructions: 654250005 + instructions: 635106957 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_1024: total: calls: 1 - instructions: 985325869 + instructions: 972289851 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_128: total: calls: 1 - instructions: 746608890 + instructions: 737502036 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_16: total: calls: 1 - instructions: 700059994 + instructions: 693532588 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_256: total: calls: 1 - instructions: 784125701 + instructions: 772373317 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_32: total: calls: 1 - instructions: 711919498 + instructions: 702362160 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_4: total: calls: 1 - instructions: 696214241 + instructions: 685788785 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_512: total: calls: 1 - instructions: 857936684 + instructions: 844405955 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_64: total: calls: 1 - instructions: 737074307 + instructions: 726589682 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_8: total: calls: 1 - instructions: 696057915 + instructions: 686302993 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_4_128: total: calls: 1 - instructions: 452857933 + instructions: 459315300 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_512_128: total: calls: 1 - instructions: 4071507249 + instructions: 3607151036 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_64_128: total: calls: 1 - instructions: 910052271 + instructions: 1026452778 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_8_128: total: calls: 1 - instructions: 599299651 + instructions: 613524152 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_principal: total: calls: 1 - instructions: 684159422 + instructions: 673778034 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_u64_blob8: total: calls: 1 - instructions: 566079913 + instructions: 602771450 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_u64_u64: total: calls: 1 - instructions: 586718731 + instructions: 624445708 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_u64_vec8: total: calls: 1 - instructions: 571366355 + instructions: 608676619 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec8_u64: total: calls: 1 - instructions: 755823918 + instructions: 755806572 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_1024_128: total: calls: 1 - instructions: 4475943466 + instructions: 5033881732 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_128_128: total: calls: 1 - instructions: 1418213214 + instructions: 1459480064 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_16_128: total: calls: 1 - instructions: 921111290 + instructions: 913994315 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_256_128: total: calls: 1 - instructions: 2244668594 + instructions: 2323281854 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_0: total: calls: 1 - instructions: 834330028 + instructions: 813719257 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_1024: total: calls: 1 - instructions: 1701563272 + instructions: 1683823873 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_128: total: calls: 1 - instructions: 1036968514 + instructions: 1017309423 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_16: total: calls: 1 - instructions: 871328883 + instructions: 840652482 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_256: total: calls: 1 - instructions: 1240176546 + instructions: 1236342602 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_32: total: calls: 1 - instructions: 867569469 + instructions: 847183075 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_4: total: calls: 1 - instructions: 862147420 + instructions: 845750402 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_512: total: calls: 1 - instructions: 1405971132 + instructions: 1401064252 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_64: total: calls: 1 - instructions: 968312981 + instructions: 929989220 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_8: total: calls: 1 - instructions: 856477157 + instructions: 839357726 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_4_128: total: calls: 1 - instructions: 662121914 + instructions: 653494019 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_512_128: total: calls: 1 - instructions: 3082706271 + instructions: 3276000035 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_64_128: total: calls: 1 - instructions: 1183958569 + instructions: 1185551759 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_8_128: total: calls: 1 - instructions: 821774415 + instructions: 825597534 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_iter_1k_0b: total: calls: 1 - instructions: 975992 + instructions: 1493857 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_iter_1k_10kib: total: calls: 1 - instructions: 2491763 + instructions: 57104133 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_iter_20_10mib: total: calls: 1 - instructions: 18467176 + instructions: 1104340975 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_iter_rev_1k_0b: total: calls: 1 - instructions: 978166 + instructions: 1495996 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_iter_rev_1k_10kib: total: calls: 1 - instructions: 2475597 + instructions: 57081770 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_iter_rev_20_10mib: total: calls: 1 - instructions: 18467168 + instructions: 1104340557 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_keys_1k_0b: total: calls: 1 - instructions: 982657 + instructions: 946482 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_keys_1k_10kib: total: calls: 1 - instructions: 2498428 + instructions: 2393783 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_keys_20_10mib: total: calls: 1 - instructions: 18467320 + instructions: 19086715 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_keys_rev_1k_0b: total: calls: 1 - instructions: 984223 + instructions: 963719 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_keys_rev_1k_10kib: total: calls: 1 - instructions: 2481654 + instructions: 2389681 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_keys_rev_20_10mib: total: calls: 1 - instructions: 18467298 + instructions: 19087050 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_values_1k_0b: total: calls: 1 - instructions: 1230992 + instructions: 1491255 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_values_1k_10kib: total: calls: 1 - instructions: 56740279 + instructions: 57101531 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_values_20_10mib: total: calls: 1 - instructions: 1103710894 + instructions: 1104340925 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_values_rev_1k_0b: total: calls: 1 - instructions: 1231498 + instructions: 1493394 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_values_rev_1k_10kib: total: calls: 1 - instructions: 56683107 + instructions: 57079168 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_scan_values_rev_20_10mib: total: calls: 1 - instructions: 1103710405 + instructions: 1104340507 heap_increase: 0 stable_memory_increase: 0 scopes: {} diff --git a/benchmarks/btreemap/src/main.rs b/benchmarks/btreemap/src/main.rs index 167b973c..9a3641e5 100644 --- a/benchmarks/btreemap/src/main.rs +++ b/benchmarks/btreemap/src/main.rs @@ -777,7 +777,7 @@ fn range_key_sum_helper_v2(count: usize, size: usize) -> BenchResult { bench_fn(|| { btree .range((Bound::Included(0), Bound::Included(size as u32))) - .map(|entry| *entry.key()) + .map(|(k, _)| k) .sum::() }) } @@ -794,8 +794,8 @@ fn range_value_sum_helper_v2(count: usize, size: usize) -> BenchResult { bench_fn(|| { btree .range((Bound::Included(0), Bound::Included(size as u32))) - .filter(|entry| *entry.key() % 3 == 0) - .map(|entry| entry.value().len()) + .filter(|(k, _v)| *k % 3 == 0) + .map(|(_k, v)| v.len()) .sum::() }) } diff --git a/benchmarks/btreeset/src/main.rs b/benchmarks/btreeset/src/main.rs index ae2fa8e6..c9e6ac25 100644 --- a/benchmarks/btreeset/src/main.rs +++ b/benchmarks/btreeset/src/main.rs @@ -1,318 +1,318 @@ -use canbench_rs::{bench, bench_fn, BenchResult}; -use ic_stable_structures::memory_manager::{MemoryId, MemoryManager}; -use ic_stable_structures::storable::Blob; -use ic_stable_structures::{btreeset::BTreeSet, DefaultMemoryImpl, Storable}; - -type Blob8 = Blob<8>; -type Blob16 = Blob<16>; -type Blob32 = Blob<32>; -type Blob64 = Blob<64>; -type Blob128 = Blob<128>; -type Blob256 = Blob<256>; -type Blob512 = Blob<512>; -type Blob1024 = Blob<1024>; - -/// Helper macro to generate benchmarks. -macro_rules! bench_tests { - ($( $fn_name:ident, $helper:ident, $k:expr );+ $(;)?) => { - $( - #[bench(raw)] - pub fn $fn_name() -> BenchResult { - $helper::<$k>() - } - )+ - }; -} -// Profiles inserting a large number of keys into a BTreeSet. -fn insert_helper() -> BenchResult { - let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); - let mut btreeset = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); - let num_keys = 10_000; - - bench_fn(|| { - for i in 0..num_keys { - let key = generate_key::(i); - btreeset.insert(key); - } - }) -} - -// Profiles removing a large number of keys from a BTreeSet. -fn remove_helper() -> BenchResult { - let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); - let mut btreeset = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); - let num_keys = 10_000; - - for i in 0..num_keys { - btreeset.insert(generate_key::(i)); - } - - bench_fn(|| { - for i in 0..num_keys { - let key = generate_key::(i); - btreeset.remove(&key); - } - }) -} - -// Profiles iterating over a BTreeSet. -fn iter_helper() -> BenchResult { - let mut btreeset = BTreeSet::new(DefaultMemoryImpl::default()); - - for i in 0..10_000 { - btreeset.insert(generate_key::(i)); - } - - bench_fn(|| for _ in btreeset.iter() {}) -} - -// Profiles range queries on a BTreeSet. -fn range_helper() -> BenchResult { - let mut btreeset = BTreeSet::new(DefaultMemoryImpl::default()); - - for i in 0..10_000 { - btreeset.insert(generate_key::(i)); - } - - let start = generate_key::(2000); - let end = generate_key::(8000); - - bench_fn(|| for _ in btreeset.range(start..end) {}) -} - -// Profiles the union operation on two BTreeSets. -fn union_helper() -> BenchResult { - let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); - let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); - let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); - let num_keys = 1_000; - - for i in 0..num_keys { - btreeset1.insert(generate_key::(i)); - if i % 2 == 0 { - btreeset2.insert(generate_key::(i)); - } - } - - bench_fn(|| for _ in btreeset1.union(&btreeset2) {}) -} - -// Profiles the intersection operation on two BTreeSets. -fn intersection_helper() -> BenchResult { - let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); - let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); - let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); - let num_keys = 1_000; - - for i in 0..num_keys { - btreeset1.insert(generate_key::(i)); - if i % 2 == 0 { - btreeset2.insert(generate_key::(i)); - } - } - - bench_fn(|| for _ in btreeset1.intersection(&btreeset2) {}) -} - -// Profiles the symmetric difference operation on two BTreeSets. -fn symmetric_difference_helper() -> BenchResult { - let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); - let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); - let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); - let num_keys = 1_000; - - for i in 0..num_keys { - btreeset1.insert(generate_key::(i)); - if i % 2 == 0 { - btreeset2.insert(generate_key::(i)); - } - } - - bench_fn(|| for _ in btreeset1.symmetric_difference(&btreeset2) {}) -} - -// Profiles the is_subset operation on two BTreeSets. -fn is_subset_helper() -> BenchResult { - let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); - let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); - let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); - let num_keys = 1_000; - - for i in 0..num_keys { - btreeset1.insert(generate_key::(i)); - if i % 2 == 0 { - btreeset2.insert(generate_key::(i)); - } - } - - bench_fn(|| { - let _ = btreeset1.is_subset(&btreeset2); - }) -} - -// Profiles the is_superset operation on two BTreeSets. -fn is_superset_helper() -> BenchResult { - let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); - let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); - let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); - let num_keys = 1_000; - - for i in 0..num_keys { - btreeset1.insert(generate_key::(i)); - if i % 2 == 0 { - btreeset2.insert(generate_key::(i)); - } - } - - bench_fn(|| { - let _ = btreeset1.is_superset(&btreeset2); - }) -} - -// Profiles the is_disjoint operation on two BTreeSets. -fn is_disjoint_helper() -> BenchResult { - let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); - let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); - let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); - let num_keys = 1_000; - - for i in 0..num_keys { - btreeset1.insert(generate_key::(i)); - if i % 2 == 0 { - btreeset2.insert(generate_key::(i + num_keys)); // Ensure disjoint sets - } - } - - bench_fn(|| { - let _ = btreeset1.is_disjoint(&btreeset2); - }) -} - -// Generates keys directly based on the type `K`. -fn generate_key(i: u32) -> K { - let bytes = i.to_be_bytes(); - let padded_bytes = { - let mut buffer = vec![0; K::BOUND.max_size() as usize]; - buffer[..bytes.len()].copy_from_slice(&bytes); - buffer - }; - K::from_bytes(std::borrow::Cow::Owned(padded_bytes)) -} - -// Add benchmarks for insert, remove, and range with additional key types. -bench_tests! { - btreeset_insert_u32, insert_helper, u32; - btreeset_insert_u64, insert_helper, u64; - btreeset_insert_blob_8, insert_helper, Blob8; - btreeset_insert_blob_16, insert_helper, Blob16; - btreeset_insert_blob_32, insert_helper, Blob32; - btreeset_insert_blob_64, insert_helper, Blob64; - btreeset_insert_blob_128, insert_helper, Blob128; - btreeset_insert_blob_256, insert_helper, Blob256; - btreeset_insert_blob_512, insert_helper, Blob512; - btreeset_insert_blob_1024, insert_helper, Blob1024; - - btreeset_remove_u32, remove_helper, u32; - btreeset_remove_u64, remove_helper, u64; - btreeset_remove_blob_8, remove_helper, Blob8; - btreeset_remove_blob_16, remove_helper, Blob16; - btreeset_remove_blob_32, remove_helper, Blob32; - btreeset_remove_blob_64, remove_helper, Blob64; - btreeset_remove_blob_128, remove_helper, Blob128; - btreeset_remove_blob_256, remove_helper, Blob256; - btreeset_remove_blob_512, remove_helper, Blob512; - btreeset_remove_blob_1024, remove_helper, Blob1024; - - btreeset_range_u32, range_helper, u32; - btreeset_range_u64, range_helper, u64; - btreeset_range_blob_8, range_helper, Blob8; - btreeset_range_blob_16, range_helper, Blob16; - btreeset_range_blob_32, range_helper, Blob32; - btreeset_range_blob_64, range_helper, Blob64; - btreeset_range_blob_128, range_helper, Blob128; - btreeset_range_blob_256, range_helper, Blob256; - btreeset_range_blob_512, range_helper, Blob512; - btreeset_range_blob_1024, range_helper, Blob1024; - - btreeset_iter_u32, iter_helper, u32; - btreeset_iter_u64, iter_helper, u64; - btreeset_iter_blob_8, iter_helper, Blob8; - btreeset_iter_blob_16, iter_helper, Blob16; - btreeset_iter_blob_32, iter_helper, Blob32; - btreeset_iter_blob_64, iter_helper, Blob64; - btreeset_iter_blob_128, iter_helper, Blob128; - btreeset_iter_blob_256, iter_helper, Blob256; - btreeset_iter_blob_512, iter_helper, Blob512; - btreeset_iter_blob_1024, iter_helper, Blob1024; -} - -// Add benchmarks for set operations with additional key types. -bench_tests! { - btreeset_union_u32, union_helper, u32; - btreeset_union_u64, union_helper, u64; - btreeset_union_blob_8, union_helper, Blob8; - btreeset_union_blob_16, union_helper, Blob16; - btreeset_union_blob_32, union_helper, Blob32; - btreeset_union_blob_64, union_helper, Blob64; - btreeset_union_blob_128, union_helper, Blob128; - btreeset_union_blob_256, union_helper, Blob256; - btreeset_union_blob_512, union_helper, Blob512; - btreeset_union_blob_1024, union_helper, Blob1024; - - btreeset_intersection_u32, intersection_helper, u32; - btreeset_intersection_u64, intersection_helper, u64; - btreeset_intersection_blob_8, intersection_helper, Blob8; - btreeset_intersection_blob_16, intersection_helper, Blob16; - btreeset_intersection_blob_32, intersection_helper, Blob32; - btreeset_intersection_blob_64, intersection_helper, Blob64; - btreeset_intersection_blob_128, intersection_helper, Blob128; - btreeset_intersection_blob_256, intersection_helper, Blob256; - btreeset_intersection_blob_512, intersection_helper, Blob512; - btreeset_intersection_blob_1024, intersection_helper, Blob1024; - - btreeset_symmetric_difference_u32, symmetric_difference_helper, u32; - btreeset_symmetric_difference_u64, symmetric_difference_helper, u64; - btreeset_symmetric_difference_blob_8, symmetric_difference_helper, Blob8; - btreeset_symmetric_difference_blob_16, symmetric_difference_helper, Blob16; - btreeset_symmetric_difference_blob_32, symmetric_difference_helper, Blob32; - btreeset_symmetric_difference_blob_64, symmetric_difference_helper, Blob64; - btreeset_symmetric_difference_blob_128, symmetric_difference_helper, Blob128; - btreeset_symmetric_difference_blob_256, symmetric_difference_helper, Blob256; - btreeset_symmetric_difference_blob_512, symmetric_difference_helper, Blob512; - btreeset_symmetric_difference_blob_1024, symmetric_difference_helper, Blob1024; - - btreeset_is_subset_u32, is_subset_helper, u32; - btreeset_is_subset_u64, is_subset_helper, u64; - btreeset_is_subset_blob_8, is_subset_helper, Blob8; - btreeset_is_subset_blob_16, is_subset_helper, Blob16; - btreeset_is_subset_blob_32, is_subset_helper, Blob32; - btreeset_is_subset_blob_64, is_subset_helper, Blob64; - btreeset_is_subset_blob_128, is_subset_helper, Blob128; - btreeset_is_subset_blob_256, is_subset_helper, Blob256; - btreeset_is_subset_blob_512, is_subset_helper, Blob512; - btreeset_is_subset_blob_1024, is_subset_helper, Blob1024; - - btreeset_is_superset_u32, is_superset_helper, u32; - btreeset_is_superset_u64, is_superset_helper, u64; - btreeset_is_superset_blob_8, is_superset_helper, Blob8; - btreeset_is_superset_blob_16, is_superset_helper, Blob16; - btreeset_is_superset_blob_32, is_superset_helper, Blob32; - btreeset_is_superset_blob_64, is_superset_helper, Blob64; - btreeset_is_superset_blob_128, is_superset_helper, Blob128; - btreeset_is_superset_blob_256, is_superset_helper, Blob256; - btreeset_is_superset_blob_512, is_superset_helper, Blob512; - btreeset_is_superset_blob_1024, is_superset_helper, Blob1024; - - btreeset_is_disjoint_u32, is_disjoint_helper, u32; - btreeset_is_disjoint_u64, is_disjoint_helper, u64; - btreeset_is_disjoint_blob_8, is_disjoint_helper, Blob8; - btreeset_is_disjoint_blob_16, is_disjoint_helper, Blob16; - btreeset_is_disjoint_blob_32, is_disjoint_helper, Blob32; - btreeset_is_disjoint_blob_64, is_disjoint_helper, Blob64; - btreeset_is_disjoint_blob_128, is_disjoint_helper, Blob128; - btreeset_is_disjoint_blob_256, is_disjoint_helper, Blob256; - btreeset_is_disjoint_blob_512, is_disjoint_helper, Blob512; - btreeset_is_disjoint_blob_1024, is_disjoint_helper, Blob1024; -} +// use canbench_rs::{bench, bench_fn, BenchResult}; +// use ic_stable_structures::memory_manager::{MemoryId, MemoryManager}; +// use ic_stable_structures::storable::Blob; +// use ic_stable_structures::{btreeset::BTreeSet, DefaultMemoryImpl, Storable}; + +// type Blob8 = Blob<8>; +// type Blob16 = Blob<16>; +// type Blob32 = Blob<32>; +// type Blob64 = Blob<64>; +// type Blob128 = Blob<128>; +// type Blob256 = Blob<256>; +// type Blob512 = Blob<512>; +// type Blob1024 = Blob<1024>; + +// /// Helper macro to generate benchmarks. +// macro_rules! bench_tests { +// ($( $fn_name:ident, $helper:ident, $k:expr );+ $(;)?) => { +// $( +// #[bench(raw)] +// pub fn $fn_name() -> BenchResult { +// $helper::<$k>() +// } +// )+ +// }; +// } +// // Profiles inserting a large number of keys into a BTreeSet. +// fn insert_helper() -> BenchResult { +// let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); +// let mut btreeset = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); +// let num_keys = 10_000; + +// bench_fn(|| { +// for i in 0..num_keys { +// let key = generate_key::(i); +// btreeset.insert(key); +// } +// }) +// } + +// // Profiles removing a large number of keys from a BTreeSet. +// fn remove_helper() -> BenchResult { +// let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); +// let mut btreeset = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); +// let num_keys = 10_000; + +// for i in 0..num_keys { +// btreeset.insert(generate_key::(i)); +// } + +// bench_fn(|| { +// for i in 0..num_keys { +// let key = generate_key::(i); +// btreeset.remove(&key); +// } +// }) +// } + +// // Profiles iterating over a BTreeSet. +// fn iter_helper() -> BenchResult { +// let mut btreeset = BTreeSet::new(DefaultMemoryImpl::default()); + +// for i in 0..10_000 { +// btreeset.insert(generate_key::(i)); +// } + +// bench_fn(|| for _ in btreeset.iter() {}) +// } + +// // Profiles range queries on a BTreeSet. +// fn range_helper() -> BenchResult { +// let mut btreeset = BTreeSet::new(DefaultMemoryImpl::default()); + +// for i in 0..10_000 { +// btreeset.insert(generate_key::(i)); +// } + +// let start = generate_key::(2000); +// let end = generate_key::(8000); + +// bench_fn(|| for _ in btreeset.range(start..end) {}) +// } + +// // Profiles the union operation on two BTreeSets. +// fn union_helper() -> BenchResult { +// let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); +// let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); +// let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); +// let num_keys = 1_000; + +// for i in 0..num_keys { +// btreeset1.insert(generate_key::(i)); +// if i % 2 == 0 { +// btreeset2.insert(generate_key::(i)); +// } +// } + +// bench_fn(|| for _ in btreeset1.union(&btreeset2) {}) +// } + +// // Profiles the intersection operation on two BTreeSets. +// fn intersection_helper() -> BenchResult { +// let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); +// let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); +// let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); +// let num_keys = 1_000; + +// for i in 0..num_keys { +// btreeset1.insert(generate_key::(i)); +// if i % 2 == 0 { +// btreeset2.insert(generate_key::(i)); +// } +// } + +// bench_fn(|| for _ in btreeset1.intersection(&btreeset2) {}) +// } + +// // Profiles the symmetric difference operation on two BTreeSets. +// fn symmetric_difference_helper() -> BenchResult { +// let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); +// let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); +// let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); +// let num_keys = 1_000; + +// for i in 0..num_keys { +// btreeset1.insert(generate_key::(i)); +// if i % 2 == 0 { +// btreeset2.insert(generate_key::(i)); +// } +// } + +// bench_fn(|| for _ in btreeset1.symmetric_difference(&btreeset2) {}) +// } + +// // Profiles the is_subset operation on two BTreeSets. +// fn is_subset_helper() -> BenchResult { +// let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); +// let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); +// let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); +// let num_keys = 1_000; + +// for i in 0..num_keys { +// btreeset1.insert(generate_key::(i)); +// if i % 2 == 0 { +// btreeset2.insert(generate_key::(i)); +// } +// } + +// bench_fn(|| { +// let _ = btreeset1.is_subset(&btreeset2); +// }) +// } + +// // Profiles the is_superset operation on two BTreeSets. +// fn is_superset_helper() -> BenchResult { +// let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); +// let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); +// let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); +// let num_keys = 1_000; + +// for i in 0..num_keys { +// btreeset1.insert(generate_key::(i)); +// if i % 2 == 0 { +// btreeset2.insert(generate_key::(i)); +// } +// } + +// bench_fn(|| { +// let _ = btreeset1.is_superset(&btreeset2); +// }) +// } + +// // Profiles the is_disjoint operation on two BTreeSets. +// fn is_disjoint_helper() -> BenchResult { +// let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); +// let mut btreeset1 = BTreeSet::new(mem_mgr.get(MemoryId::new(0))); +// let mut btreeset2 = BTreeSet::new(mem_mgr.get(MemoryId::new(1))); +// let num_keys = 1_000; + +// for i in 0..num_keys { +// btreeset1.insert(generate_key::(i)); +// if i % 2 == 0 { +// btreeset2.insert(generate_key::(i + num_keys)); // Ensure disjoint sets +// } +// } + +// bench_fn(|| { +// let _ = btreeset1.is_disjoint(&btreeset2); +// }) +// } + +// // Generates keys directly based on the type `K`. +// fn generate_key(i: u32) -> K { +// let bytes = i.to_be_bytes(); +// let padded_bytes = { +// let mut buffer = vec![0; K::BOUND.max_size() as usize]; +// buffer[..bytes.len()].copy_from_slice(&bytes); +// buffer +// }; +// K::from_bytes(std::borrow::Cow::Owned(padded_bytes)) +// } + +// // Add benchmarks for insert, remove, and range with additional key types. +// bench_tests! { +// btreeset_insert_u32, insert_helper, u32; +// btreeset_insert_u64, insert_helper, u64; +// btreeset_insert_blob_8, insert_helper, Blob8; +// btreeset_insert_blob_16, insert_helper, Blob16; +// btreeset_insert_blob_32, insert_helper, Blob32; +// btreeset_insert_blob_64, insert_helper, Blob64; +// btreeset_insert_blob_128, insert_helper, Blob128; +// btreeset_insert_blob_256, insert_helper, Blob256; +// btreeset_insert_blob_512, insert_helper, Blob512; +// btreeset_insert_blob_1024, insert_helper, Blob1024; + +// btreeset_remove_u32, remove_helper, u32; +// btreeset_remove_u64, remove_helper, u64; +// btreeset_remove_blob_8, remove_helper, Blob8; +// btreeset_remove_blob_16, remove_helper, Blob16; +// btreeset_remove_blob_32, remove_helper, Blob32; +// btreeset_remove_blob_64, remove_helper, Blob64; +// btreeset_remove_blob_128, remove_helper, Blob128; +// btreeset_remove_blob_256, remove_helper, Blob256; +// btreeset_remove_blob_512, remove_helper, Blob512; +// btreeset_remove_blob_1024, remove_helper, Blob1024; + +// btreeset_range_u32, range_helper, u32; +// btreeset_range_u64, range_helper, u64; +// btreeset_range_blob_8, range_helper, Blob8; +// btreeset_range_blob_16, range_helper, Blob16; +// btreeset_range_blob_32, range_helper, Blob32; +// btreeset_range_blob_64, range_helper, Blob64; +// btreeset_range_blob_128, range_helper, Blob128; +// btreeset_range_blob_256, range_helper, Blob256; +// btreeset_range_blob_512, range_helper, Blob512; +// btreeset_range_blob_1024, range_helper, Blob1024; + +// btreeset_iter_u32, iter_helper, u32; +// btreeset_iter_u64, iter_helper, u64; +// btreeset_iter_blob_8, iter_helper, Blob8; +// btreeset_iter_blob_16, iter_helper, Blob16; +// btreeset_iter_blob_32, iter_helper, Blob32; +// btreeset_iter_blob_64, iter_helper, Blob64; +// btreeset_iter_blob_128, iter_helper, Blob128; +// btreeset_iter_blob_256, iter_helper, Blob256; +// btreeset_iter_blob_512, iter_helper, Blob512; +// btreeset_iter_blob_1024, iter_helper, Blob1024; +// } + +// // Add benchmarks for set operations with additional key types. +// bench_tests! { +// btreeset_union_u32, union_helper, u32; +// btreeset_union_u64, union_helper, u64; +// btreeset_union_blob_8, union_helper, Blob8; +// btreeset_union_blob_16, union_helper, Blob16; +// btreeset_union_blob_32, union_helper, Blob32; +// btreeset_union_blob_64, union_helper, Blob64; +// btreeset_union_blob_128, union_helper, Blob128; +// btreeset_union_blob_256, union_helper, Blob256; +// btreeset_union_blob_512, union_helper, Blob512; +// btreeset_union_blob_1024, union_helper, Blob1024; + +// btreeset_intersection_u32, intersection_helper, u32; +// btreeset_intersection_u64, intersection_helper, u64; +// btreeset_intersection_blob_8, intersection_helper, Blob8; +// btreeset_intersection_blob_16, intersection_helper, Blob16; +// btreeset_intersection_blob_32, intersection_helper, Blob32; +// btreeset_intersection_blob_64, intersection_helper, Blob64; +// btreeset_intersection_blob_128, intersection_helper, Blob128; +// btreeset_intersection_blob_256, intersection_helper, Blob256; +// btreeset_intersection_blob_512, intersection_helper, Blob512; +// btreeset_intersection_blob_1024, intersection_helper, Blob1024; + +// btreeset_symmetric_difference_u32, symmetric_difference_helper, u32; +// btreeset_symmetric_difference_u64, symmetric_difference_helper, u64; +// btreeset_symmetric_difference_blob_8, symmetric_difference_helper, Blob8; +// btreeset_symmetric_difference_blob_16, symmetric_difference_helper, Blob16; +// btreeset_symmetric_difference_blob_32, symmetric_difference_helper, Blob32; +// btreeset_symmetric_difference_blob_64, symmetric_difference_helper, Blob64; +// btreeset_symmetric_difference_blob_128, symmetric_difference_helper, Blob128; +// btreeset_symmetric_difference_blob_256, symmetric_difference_helper, Blob256; +// btreeset_symmetric_difference_blob_512, symmetric_difference_helper, Blob512; +// btreeset_symmetric_difference_blob_1024, symmetric_difference_helper, Blob1024; + +// btreeset_is_subset_u32, is_subset_helper, u32; +// btreeset_is_subset_u64, is_subset_helper, u64; +// btreeset_is_subset_blob_8, is_subset_helper, Blob8; +// btreeset_is_subset_blob_16, is_subset_helper, Blob16; +// btreeset_is_subset_blob_32, is_subset_helper, Blob32; +// btreeset_is_subset_blob_64, is_subset_helper, Blob64; +// btreeset_is_subset_blob_128, is_subset_helper, Blob128; +// btreeset_is_subset_blob_256, is_subset_helper, Blob256; +// btreeset_is_subset_blob_512, is_subset_helper, Blob512; +// btreeset_is_subset_blob_1024, is_subset_helper, Blob1024; + +// btreeset_is_superset_u32, is_superset_helper, u32; +// btreeset_is_superset_u64, is_superset_helper, u64; +// btreeset_is_superset_blob_8, is_superset_helper, Blob8; +// btreeset_is_superset_blob_16, is_superset_helper, Blob16; +// btreeset_is_superset_blob_32, is_superset_helper, Blob32; +// btreeset_is_superset_blob_64, is_superset_helper, Blob64; +// btreeset_is_superset_blob_128, is_superset_helper, Blob128; +// btreeset_is_superset_blob_256, is_superset_helper, Blob256; +// btreeset_is_superset_blob_512, is_superset_helper, Blob512; +// btreeset_is_superset_blob_1024, is_superset_helper, Blob1024; + +// btreeset_is_disjoint_u32, is_disjoint_helper, u32; +// btreeset_is_disjoint_u64, is_disjoint_helper, u64; +// btreeset_is_disjoint_blob_8, is_disjoint_helper, Blob8; +// btreeset_is_disjoint_blob_16, is_disjoint_helper, Blob16; +// btreeset_is_disjoint_blob_32, is_disjoint_helper, Blob32; +// btreeset_is_disjoint_blob_64, is_disjoint_helper, Blob64; +// btreeset_is_disjoint_blob_128, is_disjoint_helper, Blob128; +// btreeset_is_disjoint_blob_256, is_disjoint_helper, Blob256; +// btreeset_is_disjoint_blob_512, is_disjoint_helper, Blob512; +// btreeset_is_disjoint_blob_1024, is_disjoint_helper, Blob1024; +// } fn main() {} diff --git a/benchmarks/io_chunks/canbench_results.yml b/benchmarks/io_chunks/canbench_results.yml index 6c2e9160..b98dff6a 100644 --- a/benchmarks/io_chunks/canbench_results.yml +++ b/benchmarks/io_chunks/canbench_results.yml @@ -2,126 +2,126 @@ benches: read_chunks_btreemap_1: total: calls: 1 - instructions: 148723585 - heap_increase: 1601 + instructions: 917929728 + heap_increase: 0 stable_memory_increase: 0 scopes: {} read_chunks_btreemap_1k: total: calls: 1 - instructions: 498228206 + instructions: 1717538684 heap_increase: 0 stable_memory_increase: 0 scopes: {} read_chunks_btreemap_1m: total: calls: 1 - instructions: 40940569325 + instructions: 87473007440 heap_increase: 0 stable_memory_increase: 0 scopes: {} read_chunks_stable_1: total: calls: 1 - instructions: 104859143 + instructions: 104860129 heap_increase: 0 stable_memory_increase: 0 scopes: {} read_chunks_stable_1k: total: calls: 1 - instructions: 104985739 + instructions: 105217171 heap_increase: 0 stable_memory_increase: 0 scopes: {} read_chunks_stable_1m: total: calls: 1 - instructions: 230002739 + instructions: 462002171 heap_increase: 0 stable_memory_increase: 0 scopes: {} read_chunks_vec_1: total: calls: 1 - instructions: 104859760 + instructions: 393219636 heap_increase: 0 stable_memory_increase: 0 scopes: {} read_chunks_vec_1k: total: calls: 1 - instructions: 105826498 + instructions: 394716162 heap_increase: 0 stable_memory_increase: 0 scopes: {} read_chunks_vec_1m: total: calls: 1 - instructions: 1010905944 + instructions: 1897002163 heap_increase: 0 stable_memory_increase: 0 scopes: {} write_chunks_btreemap_1: total: calls: 1 - instructions: 357205397 - heap_increase: 13 + instructions: 957543884 + heap_increase: 1632 stable_memory_increase: 1536 scopes: {} write_chunks_btreemap_1k: total: calls: 1 - instructions: 4187119879 - heap_increase: 2 + instructions: 9545553907 + heap_increase: 4 stable_memory_increase: 1536 scopes: {} write_chunks_btreemap_1m: total: calls: 1 - instructions: 83659829857 + instructions: 168849688164 heap_increase: 0 stable_memory_increase: 3072 scopes: {} write_chunks_stable_1: total: calls: 1 - instructions: 130471968 + instructions: 130474938 heap_increase: 0 stable_memory_increase: 1664 scopes: {} write_chunks_stable_1k: total: calls: 1 - instructions: 130598745 + instructions: 130840059 heap_increase: 0 stable_memory_increase: 1664 scopes: {} write_chunks_stable_1m: total: calls: 1 - instructions: 255406658 + instructions: 495407977 heap_increase: 0 stable_memory_increase: 1664 scopes: {} write_chunks_vec_1: total: calls: 1 - instructions: 549903573 + instructions: 549906989 heap_increase: 0 stable_memory_increase: 1536 scopes: {} write_chunks_vec_1k: total: calls: 1 - instructions: 562257515 + instructions: 562978193 heap_increase: 0 stable_memory_increase: 1536 scopes: {} write_chunks_vec_1m: total: calls: 1 - instructions: 1896593101 + instructions: 2641609036 heap_increase: 0 stable_memory_increase: 1536 scopes: {} diff --git a/benchmarks/io_chunks/src/main.rs b/benchmarks/io_chunks/src/main.rs index cfe6ba73..fef5baff 100644 --- a/benchmarks/io_chunks/src/main.rs +++ b/benchmarks/io_chunks/src/main.rs @@ -102,19 +102,19 @@ fn read_chunks_btreemap(mem_id: u8, n: usize) -> BenchResult { // StableVec benchmarks fn write_chunks_vec(mem_id: u8, n: usize) -> BenchResult { - let vec: StableVec, _> = StableVec::new(init_memory(mem_id)); + let vec: StableVec, _> = StableVec::new(init_memory(mem_id)).unwrap(); let chunks: Vec<_> = chunk_data(n).iter().map(|v| BoundedVecN::from(v)).collect(); bench_fn(|| { for chunk in &chunks { - vec.push(chunk); + vec.push(chunk).unwrap(); } }) } fn read_chunks_vec(mem_id: u8, n: usize) -> BenchResult { write_chunks_vec::(mem_id, n); - let vec: StableVec, _> = StableVec::init(init_memory(mem_id)); + let vec: StableVec, _> = StableVec::init(init_memory(mem_id)).unwrap(); bench_fn(|| { for i in 0..n as u64 { diff --git a/benchmarks/memory_manager/canbench_results.yml b/benchmarks/memory_manager/canbench_results.yml index bf482bf0..da149e42 100644 --- a/benchmarks/memory_manager/canbench_results.yml +++ b/benchmarks/memory_manager/canbench_results.yml @@ -9,14 +9,14 @@ benches: memory_manager_grow: total: calls: 1 - instructions: 347433966 + instructions: 350601057 heap_increase: 2 stable_memory_increase: 32000 scopes: {} memory_manager_overhead: total: calls: 1 - instructions: 1181977502 + instructions: 1182131418 heap_increase: 0 stable_memory_increase: 8320 scopes: {} diff --git a/benchmarks/nns/canbench_results.yml b/benchmarks/nns/canbench_results.yml index 4186b23d..82f72700 100644 --- a/benchmarks/nns/canbench_results.yml +++ b/benchmarks/nns/canbench_results.yml @@ -2,112 +2,112 @@ benches: vote_cascading_heap_centralized_10k: total: calls: 1 - instructions: 77758460 + instructions: 77758498 heap_increase: 16 stable_memory_increase: 0 scopes: {} vote_cascading_heap_centralized_1k: total: calls: 1 - instructions: 7815132 + instructions: 7815170 heap_increase: 1 stable_memory_increase: 0 scopes: {} vote_cascading_heap_chain_10k_15: total: calls: 1 - instructions: 1272207053 + instructions: 1272207091 heap_increase: 10 stable_memory_increase: 0 scopes: {} vote_cascading_heap_chain_10k_5: total: calls: 1 - instructions: 239648964 + instructions: 239649002 heap_increase: 10 stable_memory_increase: 0 scopes: {} vote_cascading_heap_chain_1k_15: total: calls: 1 - instructions: 124352570 + instructions: 124352608 heap_increase: 1 stable_memory_increase: 0 scopes: {} vote_cascading_heap_chain_1k_5: total: calls: 1 - instructions: 23867558 + instructions: 23867596 heap_increase: 0 stable_memory_increase: 0 scopes: {} vote_cascading_heap_single_vote_10k: total: calls: 1 - instructions: 5639 + instructions: 5677 heap_increase: 0 stable_memory_increase: 0 scopes: {} vote_cascading_heap_single_vote_1k: total: calls: 1 - instructions: 5737 + instructions: 5775 heap_increase: 0 stable_memory_increase: 0 scopes: {} vote_cascading_stable_centralized_10k: total: calls: 1 - instructions: 1375501036 + instructions: 2899319276 heap_increase: 10 stable_memory_increase: 0 scopes: {} vote_cascading_stable_centralized_1k: total: calls: 1 - instructions: 99996435 + instructions: 200603941 heap_increase: 1 stable_memory_increase: 0 scopes: {} vote_cascading_stable_chain_10k_15: total: calls: 1 - instructions: 9819218496 + instructions: 17777502664 heap_increase: 5 stable_memory_increase: 0 scopes: {} vote_cascading_stable_chain_10k_5: total: calls: 1 - instructions: 3007431336 + instructions: 5915696623 heap_increase: 5 stable_memory_increase: 0 scopes: {} vote_cascading_stable_chain_1k_15: total: calls: 1 - instructions: 867330736 + instructions: 1522351356 heap_increase: 0 stable_memory_increase: 0 scopes: {} vote_cascading_stable_chain_1k_5: total: calls: 1 - instructions: 253041123 + instructions: 509357284 heap_increase: 0 stable_memory_increase: 0 scopes: {} vote_cascading_stable_single_vote_10k: total: calls: 1 - instructions: 91466 + instructions: 189276 heap_increase: 0 stable_memory_increase: 0 scopes: {} vote_cascading_stable_single_vote_1k: total: calls: 1 - instructions: 66840 + instructions: 134644 heap_increase: 0 stable_memory_increase: 0 scopes: {} diff --git a/benchmarks/nns/src/nns_vote_cascading.rs b/benchmarks/nns/src/nns_vote_cascading.rs index d3545820..7d4d44e0 100644 --- a/benchmarks/nns/src/nns_vote_cascading.rs +++ b/benchmarks/nns/src/nns_vote_cascading.rs @@ -69,12 +69,12 @@ impl NeuronStore for StableNeuronStore { let previous_followees = self .followees_map .range(min_followee_map_key..=max_followee_map_key) - .map(|entry| entry.value()) + .map(|(_k, v)| v) .collect::>(); let previous_followee_keys = self .followees_map .range(min_followee_map_key..=max_followee_map_key) - .map(|entry| *entry.key()) + .map(|(k, _v)| k) .collect::>(); for key in previous_followee_keys { self.followees_map.remove(&key); @@ -104,7 +104,7 @@ impl NeuronStore for StableNeuronStore { self.followees_map .range(min_key..=max_key) - .map(|entry| entry.value()) + .map(|(_k, v)| v) .collect() } @@ -114,8 +114,8 @@ impl NeuronStore for StableNeuronStore { self.followers_index .range(min_key..=max_key) - .map(|entry| { - let ((_topic, _followee_neuron_id), follower_neuron_id) = entry.key(); + .map(|(k, _v)| { + let ((_topic, _followee_neuron_id), follower_neuron_id) = &k; *follower_neuron_id }) .collect() diff --git a/benchmarks/src/vec.rs b/benchmarks/src/vec.rs index e6ac4115..48f1b090 100644 --- a/benchmarks/src/vec.rs +++ b/benchmarks/src/vec.rs @@ -33,10 +33,10 @@ impl Storable for UnboundedVecN { Cow::Owned(self.0.clone()) } - #[inline] - fn into_bytes(self) -> Vec { - self.0 - } + // #[inline] + // fn into_bytes(self) -> Vec { + // self.0 + // } #[inline] fn from_bytes(bytes: Cow<[u8]>) -> Self { @@ -80,10 +80,10 @@ impl Storable for BoundedVecN { Cow::Owned(self.0.clone()) } - #[inline] - fn into_bytes(self) -> Vec { - self.0 - } + // #[inline] + // fn into_bytes(self) -> Vec { + // self.0 + // } #[inline] fn from_bytes(bytes: Cow<[u8]>) -> Self { diff --git a/benchmarks/vec/canbench_results.yml b/benchmarks/vec/canbench_results.yml index 7c952c1b..da9b1b74 100644 --- a/benchmarks/vec/canbench_results.yml +++ b/benchmarks/vec/canbench_results.yml @@ -9,28 +9,28 @@ benches: vec_get_blob_16: total: calls: 1 - instructions: 6405945 + instructions: 6345945 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_32: total: calls: 1 - instructions: 7123504 + instructions: 7063504 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_4: total: calls: 1 - instructions: 4824326 + instructions: 4804326 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_4_mem_manager: total: calls: 1 - instructions: 7191676 + instructions: 14514893 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -44,70 +44,70 @@ benches: vec_get_blob_64_mem_manager: total: calls: 1 - instructions: 13651091 + instructions: 22487576 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_8: total: calls: 1 - instructions: 5723200 + instructions: 5620868 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_u64: total: calls: 1 - instructions: 4790305 + instructions: 5270305 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_insert_blob_128: total: calls: 1 - instructions: 4171424 + instructions: 4151424 heap_increase: 0 stable_memory_increase: 19 scopes: {} vec_insert_blob_16: total: calls: 1 - instructions: 3336227 + instructions: 3316227 heap_increase: 0 stable_memory_increase: 2 scopes: {} vec_insert_blob_32: total: calls: 1 - instructions: 3455467 + instructions: 3435467 heap_increase: 0 stable_memory_increase: 5 scopes: {} vec_insert_blob_4: total: calls: 1 - instructions: 3247468 + instructions: 3227468 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_insert_blob_64: total: calls: 1 - instructions: 3695804 + instructions: 3675804 heap_increase: 0 stable_memory_increase: 9 scopes: {} vec_insert_blob_8: total: calls: 1 - instructions: 3276889 + instructions: 3256889 heap_increase: 0 stable_memory_increase: 1 scopes: {} vec_insert_u64: total: calls: 1 - instructions: 5379519 + instructions: 5869519 heap_increase: 0 stable_memory_increase: 1 scopes: {} diff --git a/benchmarks/vec/src/main.rs b/benchmarks/vec/src/main.rs index 02741875..7463ff59 100644 --- a/benchmarks/vec/src/main.rs +++ b/benchmarks/vec/src/main.rs @@ -91,7 +91,7 @@ fn vec_insert_blob() -> BenchResult { fn vec_insert() -> BenchResult { let num_items = 10_000; - let svec: StableVec = StableVec::new(DefaultMemoryImpl::default()); + let svec: StableVec = StableVec::new(DefaultMemoryImpl::default()).unwrap(); let mut rng = Rng::from_seed(0); let mut random_items = Vec::with_capacity(num_items); @@ -102,7 +102,7 @@ fn vec_insert() -> BenchResult { bench_fn(|| { for item in random_items.iter() { - svec.push(item); + svec.push(item).unwrap(); } }) } @@ -118,12 +118,12 @@ fn vec_get_blob_mem_manager() -> BenchResult { fn vec_get(memory: impl Memory) -> BenchResult { let num_items = 10_000; - let svec: StableVec = StableVec::new(memory); + let svec: StableVec = StableVec::new(memory).unwrap(); let mut rng = Rng::from_seed(0); for _ in 0..num_items { - svec.push(&T::random(&mut rng)); + svec.push(&T::random(&mut rng)).unwrap(); } bench_fn(|| {