Move.

Post

Share your knowledge.

andreweth..
Apr 03, 2025
Discussion

Best way to handle a unique user registry on Sui?

I'm trying to set up a unique registry of user names on Sui and am considering using vec_set. I'm concerned about its scalability. Is this the only way, and how does it scale on Sui?

  • Move CLI
2
2
Share
Comments
.

Answers

2
Dominikus .
Apr 3 2025, 11:56

If you don't need mappings, you could explore using TableVec. However, be aware that currently, achieving O(1) performance on Sui with these structures is not possible.

1
Comments
.
elfDani.
Apr 4 2025, 08:45

Vector-backed structures like vec_set are suitable only for a small number of mappings, as their performance might degrade with a larger dataset due to O(n) operations. Instead, consider using Table or ObjectTable, which might provide more efficient ways to handle your use case.

0
Comments
.

Do you know the answer?

Please log in and share it.

We use cookies to ensure you get the best experience on our website.
More info