diff --git a/Makefile b/Makefile index 6e335a94..49cc295a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APPS = dapps collections crypto pub-sub heartbeat motoko +APPS = collections all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true diff --git a/collections/perf.sh b/collections/perf.sh index 5c67c89c..be341918 100644 --- a/collections/perf.sh +++ b/collections/perf.sh @@ -3,16 +3,16 @@ load "../prelude.sh"; // use smaller page_limit to speed things up, since the whole trace is too large even with 256M. let mo_config = record { start_page = 16; page_limit = 128 }; -let hashmap = wasm_profiling("motoko/.dfx/local/canisters/hashmap/hashmap.wasm", mo_config); -let triemap = wasm_profiling("motoko/.dfx/local/canisters/triemap/triemap.wasm", mo_config); -let rbtree = wasm_profiling("motoko/.dfx/local/canisters/rbtree/rbtree.wasm", mo_config); +//let hashmap = wasm_profiling("motoko/.dfx/local/canisters/hashmap/hashmap.wasm", mo_config); +//let triemap = wasm_profiling("motoko/.dfx/local/canisters/triemap/triemap.wasm", mo_config); +//let rbtree = wasm_profiling("motoko/.dfx/local/canisters/rbtree/rbtree.wasm", mo_config); let splay = wasm_profiling("motoko/.dfx/local/canisters/splay/splay.wasm", mo_config); -let btree = wasm_profiling("motoko/.dfx/local/canisters/btreemap/btreemap.wasm", mo_config); -let zhenya = wasm_profiling("motoko/.dfx/local/canisters/zhenya_hashmap/zhenya_hashmap.wasm", mo_config); -let heap = wasm_profiling("motoko/.dfx/local/canisters/heap/heap.wasm", mo_config); -let buffer = wasm_profiling("motoko/.dfx/local/canisters/buffer/buffer.wasm", mo_config); -let vector = wasm_profiling("motoko/.dfx/local/canisters/vector/vector.wasm", mo_config); - +//let btree = wasm_profiling("motoko/.dfx/local/canisters/btreemap/btreemap.wasm", mo_config); +//let zhenya = wasm_profiling("motoko/.dfx/local/canisters/zhenya_hashmap/zhenya_hashmap.wasm", mo_config); +//let heap = wasm_profiling("motoko/.dfx/local/canisters/heap/heap.wasm", mo_config); +//let buffer = wasm_profiling("motoko/.dfx/local/canisters/buffer/buffer.wasm", mo_config); +//let vector = wasm_profiling("motoko/.dfx/local/canisters/vector/vector.wasm", mo_config); +/* let rs_config = record { start_page = 1; page_limit = 128 }; let hashmap_rs = wasm_profiling("rust/.dfx/local/canisters/hashmap/hashmap.wasm", rs_config); let btreemap_rs = wasm_profiling("rust/.dfx/local/canisters/btreemap/btreemap.wasm", rs_config); @@ -22,9 +22,7 @@ let heap_stable_rs = wasm_profiling("rust/.dfx/local/canisters/heap_stable/heap_ let imrc_hashmap_rs = wasm_profiling("rust/.dfx/local/canisters/imrc_hashmap/imrc_hashmap.wasm", rs_config); let vector_rs = wasm_profiling("rust/.dfx/local/canisters/vector/vector.wasm", rs_config); let vector_stable_rs = wasm_profiling("rust/.dfx/local/canisters/vector_stable/vector_stable.wasm", rs_config); - -//let movm_rs = wasm_profiling("rust/.dfx/local/canisters/movm/movm.wasm"); -//let movm_dynamic_rs = wasm_profiling("rust/.dfx/local/canisters/movm_dynamic/movm_dynamic.wasm"); +*/ let file = "README.md"; @@ -66,10 +64,13 @@ function perf(wasm, title, init, batch) { let init_size = 1_000_000; let batch_size = 50; output(file, "\n## Map\n\n| |binary_size|generate 1m|max mem|batch_get 50|batch_put 50|batch_remove 50|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|--:|\n"); +/* perf(hashmap, "hashmap", init_size, batch_size); perf(triemap, "triemap", init_size, batch_size); perf(rbtree, "rbtree", init_size, batch_size); +*/ perf(splay, "splay", init_size, batch_size); +/* perf(btree, "btree", init_size, batch_size); perf(zhenya, "zhenya_hashmap", init_size, batch_size); perf(btreemap_rs, "btreemap_rs", init_size, batch_size); @@ -96,13 +97,5 @@ perf(heap_rs, "heap_rs", init_size, batch_size); perf(heap_stable_rs, "heap_stable_rs", init_size, batch_size); perf(vector_rs, "vec_rs", init_size, batch_size); perf(vector_stable_rs, "vec_stable_rs", init_size, batch_size); - -/* -let movm_size = 10000; -output(file, "\n## MoVM\n\n| |binary_size|generate 10k|max mem|batch_get 50|batch_put 50|batch_remove 50|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -perf(hashmap, "hashmap", movm_size); -perf(hashmap_rs, "hashmap_rs", movm_size); -perf(imrc_hashmap_rs, "imrc_hashmap_rs", movm_size); -perf(movm_rs, "movm_rs", movm_size); -perf(movm_dynamic_rs, "movm_dynamic_rs", movm_size); */ +