What is the most efficient way to access many variables in the MIMIC value space?
A. The first performance improvement to implement is the access by OID instead of name, as detailed in the previous section. The MIMIC API features “multiple-variable” get and set operations on the MIMIC value space, which get and set multiple variables in one operation. The Tcl mimic value mget (and analogous calls in the other supported languages) is the equivalent to mimic value get for multiple variables. The same applies for the mimic value mset operation. These calls are specially efficient if you need to get/set many variables in your simulation. We ran a performance test to access a large number of variables (on the order of 100,000), first with mimic value get, then with mimic value mget with 1, then 10, and finally 100 variables per call. We repeated the experiment for mimic value mset.