InternalRegistry
vectors : order importance and efficiency
#7357
-
The I just want to know if order matters in these vectors ? Because if order doesn't matter, then maybe we could use other data structures like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @younes-io , thanks for taking a look at this part of the code. The choice here is intentional. While the order doesn't matter and using |
Beta Was this translation helpful? Give feedback.
-
Don't hesitate to reopen the topic if you want |
Beta Was this translation helpful? Give feedback.
Hey @younes-io , thanks for taking a look at this part of the code. The choice here is intentional. While the order doesn't matter and using
HashMap
is absolutely a good option too, I don't think it's certainly better, it's a trade-off. Vector may be more predictable, memory efficient and performant if the number of elements is relatively small (~up to 100). I don't think we would like to make a change without clear understanding of why it would be better