Ticket #958 (assigned task)
Replace allVariables with a multimap
| Reported by: | janez | Owned by: | janez |
|---|---|---|---|
| Milestone: | 3.0 | Component: | library |
| Severity: | minor | Keywords: | |
| Cc: | Blocking: | ||
| Blocked By: |
Description
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.
Note: See
TracTickets for help on using
tickets.

Separate multimaps for different value types