Skip to content

How efficient is a "Table"? #507

Answered by 0xaptosj
0xHepha asked this question in Questions
Discussion options

You must be logged in to vote

If you don't care about order, you can use Table or SmartTable. This should work similar as hash map so roughly O(1).

If you want indexed map which is O(logN), there's an open PR to add IndexedMap to the aptos framework, aptos-labs/aptos-core#14872

If you use vector or SimpleMap, it's O(N)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 0xaptosj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants