Skip to content

Why entityAttributes of MooseObject is an Array #468

Open
@badetitou

Description

@badetitou

The entityAttributes of MooseObject is an Array but has the same API as a SmallDictionary.

Do we remember why?
Maybe @jecisc knows?

Maybe memory consumption?

I did not tests, but I suspect that using a SmallDictionary would be faster when accessing data (direct access instead of creating a loop)

attributeAt: name ifAbsent: aBlock
	1 to: entityAttributes size do: [ :n | 
		name == (entityAttributes at: n) key ifTrue: [ 
			^ (entityAttributes at: n) value ] ].
	^ aBlock value

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions