demergent-labs / canister-profiling

Collection of canister performance benchmarks
Apache License 2.0
0 stars 0 forks source link

Add Azle implementation of Collections #5

Open dansteren opened 12 months ago

dansteren commented 12 months ago

[!NOTE] There is something wrong with Motoko and it won't build. To get the following results I had to remove all motoko canisters.

[!WARNING] Azle is very innefficient and runs out of instructions. To get the tests to pass we need to change perf.sh so that the init size is 10_000 instead of 1_000_000. That change is not committed as part of this PR.

Map

binary_size generate 1m max mem batch_get 50 batch_put 50 batch_remove 50
btreemap_rs 418_398 12_731_483 688_128 51_692 84_010 68_108
imrc_hashmap_rs 417_954 18_602_265 1_507_328 29_485 107_876 80_126
hashmap_rs 411_741 3_524_195 950_272 16_659 21_505 19_990
hashmap_ts 5_216_383 12_856_373_278 0 129_567_022 128_848_672 1_740_162
btreemap_ts 5_271_485 1_290_924_192 0 5_848_643 7_690_852 8_516_997

Priority queue

binary_size heapify 1m max mem pop_min 50 put 50
heap_rs 409_288 1_060_623 655_360 41_231 18_556 40_826
heap_ts 5_227_107 248_167_295 0 4_016_898 2_182_324 4_000_336

Growable array

binary_size generate 5k max mem batch_get 500 batch_put 500 batch_remove 500
vec_rs 408_176 265_791 655_360 12_840 25_269 21_153
vec_ts 5_215_201 13_308_208 0 1_968_978 2_161_537 2_242_626

Closes #6