Following updates are for further performance improvement:
1.Additional placement of LIBCOSIM_NO_FMI_LOGGING for disabling logging in step_finished_placeholder
Removed step_finished_placeholder and assigned nullptr to the callback pointer.
Now cosim::slave::get_variables does not create cosim::slave::variable_values for each time it's invocation, instead copies data to the argument that is passed to the function.
This changes the use of get_variables, see the updated test cases.
In set_variable_cache::modfiy_and_get, std::unordered_map<value_reference, size_t> back_refs_ is used to only update variable values that are subject to modification (via modifier). This avoids unnecessary iteration of all variables in each simulation step.
Following updates are for further performance improvement:
1.Additional placement ofLIBCOSIM_NO_FMI_LOGGING
for disabling logging instep_finished_placeholder
step_finished_placeholder
and assignednullptr
to the callback pointer.cosim::slave::get_variables
does not createcosim::slave::variable_values
for each time it's invocation, instead copies data to the argument that is passed to the function.get_variables
, see the updated test cases.set_variable_cache::modfiy_and_get
,std::unordered_map<value_reference, size_t> back_refs_
is used to only update variable values that are subject to modification (via modifier). This avoids unnecessary iteration of all variables in each simulation step.