Open
Description
Summary
This issue is to discuss the possibility to change the attr map from interface key to a typed key. As maybe I'm missing a use case for an interface key, we should discuss if it's neccesary.
Motivation
Usually attributes list should not be big enough to take advantage of a Map, from a performance perspective a slice should perform far better, if we decide to stick to a map, we should consider using a typed key.
An interface key may perfrom 10x worst because it needs to perform the following steps:
- If both "sides" of the cmp are of same types.
- If that type has '==' defined. ([]slices do not, for example)
- If the values are equal or not, but only using a dynamically dispatched "comparator"
source
Metadata
Metadata
Assignees
Labels
No labels