You may be better off with a NamedTuple
, but it is hard to say more without context, especially and MWE we can run and inspect.
A Dict
would be especially harmful when it is not concretely typed.
https://docs.julialang.org/en/v1/manual/performance-tips/#Avoid-containers-with-abstract-type-parameters-1