Discord.SortedSet.add

You're seeing just the function add, go back to Discord.SortedSet module for more information.

Specs

Adds an item to the set.

To retrieve the index of where the item was added, see index_add/2 There is no performance penalty for requesting the index while adding an item.

Performance

Unlike a hash based set that has O(1) inserts, the SortedSet is O(log(N/B)) + O(log(B)) where N is the number of items in the SortedSet and B is the Bucket Size.