Reversing an array

Thank you for performance testing the StableRBTree, as well as the link to the Motoko playground code used!

I just verified that @claudio’s assumption of the test failure is correct on the main network.

If you delete line 20, the insertion performance of StableRBTree and RBTree are identical.

According to my understanding, stable variables do not cost any more than regular variables in terms of read/write/storage. In fact, using stable data structures like StableRBTree is less expensive during upgrades.

1 Like

If I’m using Principal.Hash(basically Prim.hashBlob) for my Triemap key I’m going to get pretty random nat32s right? I wonder how lopsided it could get?