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

Add Azle implementation of Collections #5

Open
wants to merge 1 commit into
base: 2_pub_sub
Choose a base branch
from

Conversation

dansteren
Copy link

@dansteren dansteren commented Oct 12, 2023

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
heap_ts 5_227_107 248_167_295 0 4_016_898 2_182_324

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

@dansteren dansteren changed the title Add Azle implementation of hashmap Add Azle implementation of Collections Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant