Skip to content

Change Attributes from map interface key to use a typed key #10

Open
@OrlandoCo

Description

@OrlandoCo

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

cc: @Sean-Der @masterada @tarrencev @jech

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions