I need to store relatively big amount of data sorted with index, something similar to editable chat - ordered by time and with random access for editing.
The number of items are relatively big and the number of "index" operation is similar to the number of "sort" actions. I don't prevent the calculation of the "search" or the "sort" each time and I search for smarter collection.
I tried to find Ordered Dictionary collection, but I just saw solutions that use regular dictinary and calculate Object.values(dict).sort()
which is too expansive, I believe, if dict
is big and you need to sort if every ~1sec.
TL;DR
Is there Ordered Dictionary collection or something similar in TypeScript?