Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: BTreeMap V2 (beta) #115

Merged
merged 8 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
DFX_VERSION=${DFX_VERSION:=0.14.1} bash install-dfx.sh < <(yes Y)
DFX_VERSION=${DFX_VERSION:=0.14.3} bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
Expand Down
33 changes: 33 additions & 0 deletions benches/benches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,40 +177,73 @@ pub fn criterion_benchmark(c: &mut Criterion<Instructions>) {

// BTree benchmarks
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_4_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_4_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_8_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_8_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_16_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_16_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_32_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_32_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_64_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_64_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_128_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_128_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_256_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_256_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_512_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_512_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_u64_u64");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_u64_u64_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_u64_blob_8");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_u64_blob_8_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_8_u64");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_insert_blob_8_u64_v2");

bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_4_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_4_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_8_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_8_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_16_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_16_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_32_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_32_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_64_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_64_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_128_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_128_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_u64_u64");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_u64_u64_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_u64_blob_8");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_u64_blob_8_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_8_u64");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_8_u64_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_256_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_256_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_512_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_get_blob_512_1024_v2");

bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_4_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_4_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_8_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_8_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_16_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_16_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_32_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_32_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_64_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_64_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_128_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_128_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_256_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_256_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_512_1024");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_512_1024_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_u64_u64");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_u64_u64_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_u64_blob_8");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_u64_blob_8_v2");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_8_u64");
bench_function(c, *BENCHMARK_CANISTER, "btreemap_remove_blob_8_u64_v2");

// Vec benchmarks
bench_function(c, *BENCHMARK_CANISTER, "vec_insert_blob_4");
Expand Down
2 changes: 1 addition & 1 deletion benches/run-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -euo pipefail

BENCH_NAME=$1
FILE=mktemp
FILE=$(mktemp)

if ! type "drun" > /dev/null; then
echo "drun is not installed. Please add drun to your path from commit d35535c96184be039aaa31f68b48bbe45909494e."
Expand Down
4 changes: 2 additions & 2 deletions benchmark-canisters/dfx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dfx": "0.12.1",
"dfx": "0.14.3",
"canisters": {
"benchmarks": {
"candid": "candid.did",
Expand All @@ -16,4 +16,4 @@
}
},
"version": 1
}
}
Loading
Loading