Ticket #958 (assigned task)

Opened 3 years ago

Last modified 2 years ago

Replace allVariables with a multimap

Reported by: janez Owned by: janez
Milestone: 3.0 Component: library
Severity: minor Keywords:
Cc: Blocking:
Blocked By:


For variables to match, they must have the same varType and name. Since all variables are, in principle, constructed through TVariable::make, lookups take O(n2) when, say, loading a data file. This may be quite significant with 10000 variables.

We can replace allVariables, which is currently a list, with a multimap indexed by varType and name.

Alternatively (and perhaps better), we can have separate multimaps for each varType; multimaps key would then be a name.

Change History

comment:1 Changed 2 years ago by janez

  • Status changed from new to assigned

Separate multimaps for different value types

Note: See TracTickets for help on using tickets.