Skip to content

Remove VarInfo #1376

@penelopeysm

Description

@penelopeysm

There is no longer any need for VarInfo. Note that VarInfo carries with it

  • vectorised values (vi.values)
  • a transform strategy (vi.transform_strategy)
  • accumulators (vi.accs)

Now, vi.values is exactly the same as VectorValueAccumulator. This is rarely needed, and using VarInfo causes unnecessary performance losses in most scenarios. Many of the performance improvements have really resulted from the choice to stop using VarInfo See e.g.

And even in the cases where vi.values is needed, it can be simply added as a new accumulator in vi.accs.

vi.transform_strategy only exists to keep track of the status of vi.values and improve performance. However, if one uses init!! instead of evaluate!! this is not needed, because init!! takes a transform strategy as an argument.

Essentially, all use cases of evaluate!!(model, varinfo::VarInfo) should be replaced with init!!(model, oavi::OnlyAccsVarInfo, InitFromParams(varinfo.values), varinfo.transform_strategy).

With this in mind, I would argue that VarInfo should just be removed completely. There's no reason to keep maintaining an interface that's less flexible and less performant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions