diff --git a/benchmarks/btreemap/canbench_results.yml b/benchmarks/btreemap/canbench_results.yml index 9335445d..726a4c72 100644 --- a/benchmarks/btreemap/canbench_results.yml +++ b/benchmarks/btreemap/canbench_results.yml @@ -562,14 +562,14 @@ benches: btreemap_v2_insert_10mib_values: total: calls: 1 - instructions: 4414243466 + instructions: 4389914887 heap_increase: 161 stable_memory_increase: 3613 scopes: {} btreemap_v2_insert_blob8_u64: total: calls: 1 - instructions: 444987033 + instructions: 445148380 heap_increase: 0 stable_memory_increase: 4 scopes: {} @@ -590,7 +590,7 @@ benches: btreemap_v2_insert_blob_16_128: total: calls: 1 - instructions: 495692313 + instructions: 495692426 heap_increase: 0 stable_memory_increase: 24 scopes: {} @@ -618,14 +618,14 @@ benches: btreemap_v2_insert_blob_32_16: total: calls: 1 - instructions: 526875638 + instructions: 526876092 heap_increase: 0 stable_memory_increase: 11 scopes: {} btreemap_v2_insert_blob_32_256: total: calls: 1 - instructions: 580539755 + instructions: 580539981 heap_increase: 0 stable_memory_increase: 49 scopes: {} @@ -639,14 +639,14 @@ benches: btreemap_v2_insert_blob_32_4: total: calls: 1 - instructions: 517264825 + instructions: 517270027 heap_increase: 0 stable_memory_increase: 8 scopes: {} btreemap_v2_insert_blob_32_512: total: calls: 1 - instructions: 619389439 + instructions: 619389665 heap_increase: 0 stable_memory_increase: 91 scopes: {} @@ -667,7 +667,7 @@ benches: btreemap_v2_insert_blob_4_128: total: calls: 1 - instructions: 416771929 + instructions: 416771974 heap_increase: 0 stable_memory_increase: 13 scopes: {} @@ -688,21 +688,21 @@ benches: btreemap_v2_insert_blob_8_128: total: calls: 1 - instructions: 468148494 + instructions: 468148607 heap_increase: 0 stable_memory_increase: 20 scopes: {} btreemap_v2_insert_u64_blob8: total: calls: 1 - instructions: 414538939 + instructions: 414573520 heap_increase: 0 stable_memory_increase: 5 scopes: {} btreemap_v2_insert_u64_u64: total: calls: 1 - instructions: 422120086 + instructions: 422311308 heap_increase: 0 stable_memory_increase: 6 scopes: {} @@ -723,42 +723,42 @@ benches: btreemap_v2_insert_vec_1024_128: total: calls: 1 - instructions: 2724541315 + instructions: 2751883354 heap_increase: 0 stable_memory_increase: 193 scopes: {} btreemap_v2_insert_vec_128_128: total: calls: 1 - instructions: 1004230958 + instructions: 1018986630 heap_increase: 0 stable_memory_increase: 51 scopes: {} btreemap_v2_insert_vec_16_128: total: calls: 1 - instructions: 712421967 + instructions: 715440972 heap_increase: 0 stable_memory_increase: 31 scopes: {} btreemap_v2_insert_vec_256_128: total: calls: 1 - instructions: 1386961585 + instructions: 1409430838 heap_increase: 0 stable_memory_increase: 71 scopes: {} btreemap_v2_insert_vec_32_1024: total: calls: 1 - instructions: 1172134598 + instructions: 1184814611 heap_increase: 0 stable_memory_increase: 171 scopes: {} btreemap_v2_insert_vec_32_128: total: calls: 1 - instructions: 758019348 + instructions: 762530013 heap_increase: 0 stable_memory_increase: 33 scopes: {} @@ -772,7 +772,7 @@ benches: btreemap_v2_insert_vec_32_256: total: calls: 1 - instructions: 866698572 + instructions: 875753632 heap_increase: 0 stable_memory_increase: 54 scopes: {} @@ -793,14 +793,14 @@ benches: btreemap_v2_insert_vec_32_512: total: calls: 1 - instructions: 969855594 + instructions: 981187745 heap_increase: 0 stable_memory_increase: 91 scopes: {} btreemap_v2_insert_vec_32_64: total: calls: 1 - instructions: 699344644 + instructions: 699970006 heap_increase: 0 stable_memory_increase: 24 scopes: {} @@ -814,28 +814,28 @@ benches: btreemap_v2_insert_vec_4_128: total: calls: 1 - instructions: 608538730 + instructions: 610329720 heap_increase: 0 stable_memory_increase: 16 scopes: {} btreemap_v2_insert_vec_512_128: total: calls: 1 - instructions: 1840482053 + instructions: 1866471276 heap_increase: 0 stable_memory_increase: 112 scopes: {} btreemap_v2_insert_vec_64_128: total: calls: 1 - instructions: 845897952 + instructions: 853527323 heap_increase: 0 stable_memory_increase: 41 scopes: {} btreemap_v2_insert_vec_8_128: total: calls: 1 - instructions: 669688389 + instructions: 672412257 heap_increase: 0 stable_memory_increase: 23 scopes: {} @@ -912,7 +912,7 @@ benches: btreemap_v2_mem_manager_insert_blob512_u64: total: calls: 1 - instructions: 3144791193 + instructions: 3144794685 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -926,63 +926,63 @@ benches: btreemap_v2_mem_manager_insert_u64_u64: total: calls: 1 - instructions: 541900204 + instructions: 542091058 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_insert_u64_vec512: total: calls: 1 - instructions: 843362543 + instructions: 854848972 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_insert_vec512_u64: total: calls: 1 - instructions: 1959334611 + instructions: 1985385065 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_blob512_u64: total: calls: 1 - instructions: 4345562448 + instructions: 4345568982 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_u64_blob512: total: calls: 1 - instructions: 918002811 + instructions: 918003096 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_u64_u64: total: calls: 1 - instructions: 774336355 + instructions: 774990832 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_u64_vec512: total: calls: 1 - instructions: 1235311368 + instructions: 1255009601 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_mem_manager_remove_vec512_u64: total: calls: 1 - instructions: 3072998033 + instructions: 3119370019 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob8_u64: total: calls: 1 - instructions: 617525736 + instructions: 618004432 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1003,7 +1003,7 @@ benches: btreemap_v2_pop_first_blob_16_128: total: calls: 1 - instructions: 759917146 + instructions: 759917435 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1031,14 +1031,14 @@ benches: btreemap_v2_pop_first_blob_32_16: total: calls: 1 - instructions: 816200943 + instructions: 816201283 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_256: total: calls: 1 - instructions: 909758915 + instructions: 909759141 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1052,14 +1052,14 @@ benches: btreemap_v2_pop_first_blob_32_4: total: calls: 1 - instructions: 799101117 + instructions: 799112085 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_blob_32_512: total: calls: 1 - instructions: 974145440 + instructions: 974145553 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1073,7 +1073,7 @@ benches: btreemap_v2_pop_first_blob_32_8: total: calls: 1 - instructions: 817715606 + instructions: 817717399 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1087,7 +1087,7 @@ benches: btreemap_v2_pop_first_blob_512_128: total: calls: 1 - instructions: 4633015939 + instructions: 4633016190 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1101,21 +1101,21 @@ benches: btreemap_v2_pop_first_blob_8_128: total: calls: 1 - instructions: 621633417 + instructions: 621633869 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_u64_blob8: total: calls: 1 - instructions: 692238497 + instructions: 692329103 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_u64_u64: total: calls: 1 - instructions: 703685884 + instructions: 704283252 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1136,42 +1136,42 @@ benches: btreemap_v2_pop_first_vec_1024_128: total: calls: 1 - instructions: 4018498913 + instructions: 4058561257 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_128_128: total: calls: 1 - instructions: 1502646431 + instructions: 1522614084 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_16_128: total: calls: 1 - instructions: 1041313741 + instructions: 1044640043 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_256_128: total: calls: 1 - instructions: 2002757542 + instructions: 2035052771 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_1024: total: calls: 1 - instructions: 1684807804 + instructions: 1702345063 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_128: total: calls: 1 - instructions: 1103431102 + instructions: 1108685023 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1185,7 +1185,7 @@ benches: btreemap_v2_pop_first_vec_32_256: total: calls: 1 - instructions: 1222529886 + instructions: 1234428372 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1206,14 +1206,14 @@ benches: btreemap_v2_pop_first_vec_32_512: total: calls: 1 - instructions: 1372107093 + instructions: 1387844690 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_32_64: total: calls: 1 - instructions: 989955238 + instructions: 990795901 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1227,35 +1227,35 @@ benches: btreemap_v2_pop_first_vec_4_128: total: calls: 1 - instructions: 548589797 + instructions: 549923267 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_512_128: total: calls: 1 - instructions: 2691148701 + instructions: 2728821380 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_64_128: total: calls: 1 - instructions: 1241957624 + instructions: 1251470670 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_first_vec_8_128: total: calls: 1 - instructions: 862745876 + instructions: 865247718 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob8_u64: total: calls: 1 - instructions: 595826027 + instructions: 596324464 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1276,7 +1276,7 @@ benches: btreemap_v2_pop_last_blob_16_128: total: calls: 1 - instructions: 733631609 + instructions: 733631722 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1290,7 +1290,7 @@ benches: btreemap_v2_pop_last_blob_32_1024: total: calls: 1 - instructions: 1101403634 + instructions: 1101403747 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1304,14 +1304,14 @@ benches: btreemap_v2_pop_last_blob_32_16: total: calls: 1 - instructions: 789994074 + instructions: 789994300 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_blob_32_256: total: calls: 1 - instructions: 878909764 + instructions: 878909990 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1325,7 +1325,7 @@ benches: btreemap_v2_pop_last_blob_32_4: total: calls: 1 - instructions: 776952126 + instructions: 776965442 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1346,7 +1346,7 @@ benches: btreemap_v2_pop_last_blob_32_8: total: calls: 1 - instructions: 790946565 + instructions: 790947962 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1360,7 +1360,7 @@ benches: btreemap_v2_pop_last_blob_512_128: total: calls: 1 - instructions: 4464466763 + instructions: 4464466989 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1374,21 +1374,21 @@ benches: btreemap_v2_pop_last_blob_8_128: total: calls: 1 - instructions: 615779065 + instructions: 615779354 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_u64_blob8: total: calls: 1 - instructions: 670770920 + instructions: 670872335 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_u64_u64: total: calls: 1 - instructions: 681654379 + instructions: 682270872 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1409,42 +1409,42 @@ benches: btreemap_v2_pop_last_vec_1024_128: total: calls: 1 - instructions: 4236129487 + instructions: 4276255634 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_128_128: total: calls: 1 - instructions: 1508005318 + instructions: 1528030235 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_16_128: total: calls: 1 - instructions: 1022083136 + instructions: 1025426502 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_256_128: total: calls: 1 - instructions: 2063446347 + instructions: 2095735884 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_1024: total: calls: 1 - instructions: 1659038728 + instructions: 1676567325 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_128: total: calls: 1 - instructions: 1078246324 + instructions: 1083533099 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1458,7 +1458,7 @@ benches: btreemap_v2_pop_last_vec_32_256: total: calls: 1 - instructions: 1198297165 + instructions: 1210196374 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1479,14 +1479,14 @@ benches: btreemap_v2_pop_last_vec_32_512: total: calls: 1 - instructions: 1356519035 + instructions: 1372237172 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_32_64: total: calls: 1 - instructions: 968507554 + instructions: 969366613 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1500,28 +1500,28 @@ benches: btreemap_v2_pop_last_vec_4_128: total: calls: 1 - instructions: 534198256 + instructions: 535497301 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_512_128: total: calls: 1 - instructions: 2790585867 + instructions: 2828271962 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_64_128: total: calls: 1 - instructions: 1230020877 + instructions: 1239503601 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_pop_last_vec_8_128: total: calls: 1 - instructions: 862433228 + instructions: 864933984 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1591,14 +1591,14 @@ benches: btreemap_v2_remove_10mib_values: total: calls: 1 - instructions: 4738884700 + instructions: 4711735840 heap_increase: 0 stable_memory_increase: 657 scopes: {} btreemap_v2_remove_blob8_u64: total: calls: 1 - instructions: 596895442 + instructions: 597402521 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1633,14 +1633,14 @@ benches: btreemap_v2_remove_blob_32_1024: total: calls: 1 - instructions: 998591484 + instructions: 998591597 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_128: total: calls: 1 - instructions: 762964206 + instructions: 762964319 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1654,7 +1654,7 @@ benches: btreemap_v2_remove_blob_32_256: total: calls: 1 - instructions: 799332913 + instructions: 799333504 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1668,14 +1668,14 @@ benches: btreemap_v2_remove_blob_32_4: total: calls: 1 - instructions: 712636077 + instructions: 712643752 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_32_512: total: calls: 1 - instructions: 872035084 + instructions: 872035197 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1689,14 +1689,14 @@ benches: btreemap_v2_remove_blob_32_8: total: calls: 1 - instructions: 712282460 + instructions: 712284119 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_blob_4_128: total: calls: 1 - instructions: 464428203 + instructions: 464428655 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1724,14 +1724,14 @@ benches: btreemap_v2_remove_u64_blob8: total: calls: 1 - instructions: 582340960 + instructions: 582430661 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_u64_u64: total: calls: 1 - instructions: 603270076 + instructions: 603924879 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1752,42 +1752,42 @@ benches: btreemap_v2_remove_vec_1024_128: total: calls: 1 - instructions: 4438860682 + instructions: 4486822914 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_128_128: total: calls: 1 - instructions: 1418057388 + instructions: 1441411708 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_16_128: total: calls: 1 - instructions: 926755003 + instructions: 930370511 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_256_128: total: calls: 1 - instructions: 2215939794 + instructions: 2253983036 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_1024: total: calls: 1 - instructions: 1691463667 + instructions: 1712407887 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_128: total: calls: 1 - instructions: 1038694882 + instructions: 1044675402 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1801,7 +1801,7 @@ benches: btreemap_v2_remove_vec_32_256: total: calls: 1 - instructions: 1244067984 + instructions: 1258480662 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1822,14 +1822,14 @@ benches: btreemap_v2_remove_vec_32_512: total: calls: 1 - instructions: 1400789105 + instructions: 1419720324 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_32_64: total: calls: 1 - instructions: 981774893 + instructions: 982667924 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -1843,28 +1843,28 @@ benches: btreemap_v2_remove_vec_4_128: total: calls: 1 - instructions: 668557997 + instructions: 670016444 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_512_128: total: calls: 1 - instructions: 3047442828 + instructions: 3092666660 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_64_128: total: calls: 1 - instructions: 1190503436 + instructions: 1201307935 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_v2_remove_vec_8_128: total: calls: 1 - instructions: 831016555 + instructions: 833748512 heap_increase: 0 stable_memory_increase: 0 scopes: {} diff --git a/benchmarks/btreeset/canbench_results.yml b/benchmarks/btreeset/canbench_results.yml index 1968303e..67545f8d 100644 --- a/benchmarks/btreeset/canbench_results.yml +++ b/benchmarks/btreeset/canbench_results.yml @@ -2,70 +2,70 @@ benches: btreeset_insert_blob_1024: total: calls: 1 - instructions: 7286690242 + instructions: 7297615291 heap_increase: 1 stable_memory_increase: 256 scopes: {} btreeset_insert_blob_128: total: calls: 1 - instructions: 1655515544 + instructions: 1666440141 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_insert_blob_16: total: calls: 1 - instructions: 742764840 + instructions: 745165513 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_insert_blob_256: total: calls: 1 - instructions: 2467049413 + instructions: 2477974010 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_insert_blob_32: total: calls: 1 - instructions: 838550745 + instructions: 844209596 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_insert_blob_512: total: calls: 1 - instructions: 4071180368 + instructions: 4082105191 heap_increase: 0 stable_memory_increase: 128 scopes: {} btreeset_insert_blob_64: total: calls: 1 - instructions: 1000266143 + instructions: 1008193748 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_insert_blob_8: total: calls: 1 - instructions: 720924777 + instructions: 722754664 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_insert_u32: total: calls: 1 - instructions: 569311458 + instructions: 569721493 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_insert_u64: total: calls: 1 - instructions: 588524339 + instructions: 589197609 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -492,70 +492,70 @@ benches: btreeset_remove_blob_1024: total: calls: 1 - instructions: 7742824218 + instructions: 7753750149 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_blob_128: total: calls: 1 - instructions: 1687315215 + instructions: 1698240802 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_blob_16: total: calls: 1 - instructions: 735109295 + instructions: 737512849 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_blob_256: total: calls: 1 - instructions: 2554595544 + instructions: 2565521131 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_blob_32: total: calls: 1 - instructions: 828360358 + instructions: 834021583 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_blob_512: total: calls: 1 - instructions: 4281538178 + instructions: 4292463991 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_blob_64: total: calls: 1 - instructions: 1009246256 + instructions: 1017174993 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_blob_8: total: calls: 1 - instructions: 713356340 + instructions: 715189550 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_u32: total: calls: 1 - instructions: 560012231 + instructions: 560428257 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreeset_remove_u64: total: calls: 1 - instructions: 583587452 + instructions: 584266713 heap_increase: 0 stable_memory_increase: 0 scopes: {} diff --git a/benchmarks/compare/canbench_results.yml b/benchmarks/compare/canbench_results.yml index 25bbf0e7..4c9ef89e 100644 --- a/benchmarks/compare/canbench_results.yml +++ b/benchmarks/compare/canbench_results.yml @@ -2,8 +2,8 @@ benches: read_chunks_btreemap_1: total: calls: 1 - instructions: 148723119 - heap_increase: 0 + instructions: 148723640 + heap_increase: 1601 stable_memory_increase: 0 scopes: {} read_chunks_btreemap_1k: @@ -65,21 +65,21 @@ benches: write_chunks_btreemap_1: total: calls: 1 - instructions: 362178795 - heap_increase: 34 + instructions: 357205117 + heap_increase: 13 stable_memory_increase: 1536 scopes: {} write_chunks_btreemap_1k: total: calls: 1 - instructions: 4205340423 + instructions: 4188695663 heap_increase: 2 stable_memory_increase: 1536 scopes: {} write_chunks_btreemap_1m: total: calls: 1 - instructions: 88707302109 + instructions: 88827798790 heap_increase: 0 stable_memory_increase: 3072 scopes: {} diff --git a/benchmarks/vec/canbench_results.yml b/benchmarks/vec/canbench_results.yml index bd83ad43..7c952c1b 100644 --- a/benchmarks/vec/canbench_results.yml +++ b/benchmarks/vec/canbench_results.yml @@ -65,49 +65,49 @@ benches: vec_insert_blob_128: total: calls: 1 - instructions: 4151424 + instructions: 4171424 heap_increase: 0 stable_memory_increase: 19 scopes: {} vec_insert_blob_16: total: calls: 1 - instructions: 3316227 + instructions: 3336227 heap_increase: 0 stable_memory_increase: 2 scopes: {} vec_insert_blob_32: total: calls: 1 - instructions: 3435467 + instructions: 3455467 heap_increase: 0 stable_memory_increase: 5 scopes: {} vec_insert_blob_4: total: calls: 1 - instructions: 3227468 + instructions: 3247468 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_insert_blob_64: total: calls: 1 - instructions: 3675804 + instructions: 3695804 heap_increase: 0 stable_memory_increase: 9 scopes: {} vec_insert_blob_8: total: calls: 1 - instructions: 3256889 + instructions: 3276889 heap_increase: 0 stable_memory_increase: 1 scopes: {} vec_insert_u64: total: calls: 1 - instructions: 5359519 + instructions: 5379519 heap_increase: 0 stable_memory_increase: 1 scopes: {} diff --git a/src/btreemap/node/io.rs b/src/btreemap/node/io.rs index 9061f9fb..4a2c97e8 100644 --- a/src/btreemap/node/io.rs +++ b/src/btreemap/node/io.rs @@ -37,31 +37,31 @@ impl Memory for NodeReader<'_, M> { Bytes::from(self.page_size.get()), ); - let mut bytes_read = 0; + let mut position = 0; for RealSegment { page_idx, offset, length, } in iter { - // SAFETY: read_unsafe() is safe to call iff bytes_read + length <= count since the + // SAFETY: read_unsafe() is safe to call iff `position + length <= count` since the // caller guarantees that we can write `count` number of bytes to `dst`. - assert!(bytes_read + length.get() as usize <= count); - if page_idx == 0 { - self.memory.read_unsafe( - (self.address + offset).get(), - dst.add(bytes_read), - length.get() as usize, - ); - } else { - self.memory.read_unsafe( + let len = length.get() as usize; + assert!(position + len <= count); + match page_idx { + // Initial page. + 0 => self + .memory + .read_unsafe((self.address + offset).get(), dst.add(position), len), + // Overflow page. + _ => self.memory.read_unsafe( (self.overflows[page_idx - 1] + offset).get(), - dst.add(bytes_read), - length.get() as usize, - ); + dst.add(position), + len, + ), } - bytes_read += length.get() as usize; + position += len; } } @@ -238,6 +238,15 @@ impl<'a, M: Memory> NodeWriter<'a, M> { return; } + // Batch overflow page allocation. + let needed_pages = + compute_num_overflow_pages_needed(end_offset, self.page_size.get() as u64) as usize; + self.overflows + .reserve(needed_pages.saturating_sub(self.overflows.len())); + while self.overflows.len() < needed_pages { + self.allocate_new_page(); + } + let iter = NodeIterator::new( VirtualSegment { address: Address::from(offset), @@ -246,32 +255,29 @@ impl<'a, M: Memory> NodeWriter<'a, M> { Bytes::from(self.page_size.get()), ); - let mut bytes_written = 0; + let mut position = 0; for RealSegment { page_idx, offset, length, } in iter { - let offset = if page_idx == 0 { - // Write to the initial page. - (self.address + offset).get() - } else { - // Write to an overflow page, allocating it if it doesn't already exist. - if self.overflows.len() < page_idx { - self.allocate_new_page(); - } - - (self.overflows[page_idx - 1] + offset).get() + let len = length.get() as usize; + match page_idx { + // Initial page. + 0 => write( + self.allocator.memory(), + (self.address + offset).get(), + &src[position..position + len], + ), + // Overflow page. + _ => write( + self.allocator.memory(), + (self.overflows[page_idx - 1] + offset).get(), + &src[position..position + len], + ), }; - - write( - self.allocator.memory(), - offset, - &src[bytes_written as usize..(bytes_written + length.get()) as usize], - ); - - bytes_written += length.get(); + position += len; } }