Open alnoki opened 1 year ago
For this, we need ordering of arbitrary values T
. We have discussed to implement this on native level (a hack), but we are also looking at actually adding traits (compiler v2). Probably we are moving forward with the hack (@lightmark FYI).
@BriungRi @davidiw @movekevin @vgao1996 @wrwg
Presently, the Aptos Framework and Move/Aptos Standard libraries include assorted vector and map collections, but no set implementations. The following implementations are suggested:
For collection size fits in a single storage slot:
For collection size does not fit in a single storage slot:
AVL trees are suggested to optimize for lookup speed, though a red-black tree could be used for optimize insertion/removal time