3 ms·
But prevents optimisation, if that optimisation would lose the iteration order. If you need defined ordering in your type, use it. Otherwise, don't specify it.
by wizzwizz4 5y ago
But prevents optimisation, if that optimisation would lose the iteration order.
If you need defined ordering in your type, use it. Otherwise, don't specify it.
- yxhuvud 5y agoSure, but the overhead to iterate in insertion order is very small. Sorting by key is way more expensive.