3 ms·
Kind of? It usually means you've compromised the data structure somehow but occasionally it shows up incidentally. For example, if you append the keys/values t
by JonChesterfield 2y ago
Kind of? It usually means you've compromised the data structure somehow but occasionally it shows up incidentally.
For example, if you append the keys/values to an arena instead of inline in the hash you get a different set of performance tradeoffs. However insertion order is then available by walking the arena.
Appending to an arena in the background is a decent choice for variably sized data, as opposed to heap allocating everything one at a time. That probably has to store the size of each item, hence a forward iterator over the arena at zero cost. Minor quibbles around deleting and tombstones notwithstanding.