Key result
Lookup tables increased simulation speed by up to 86% compared to direct evaluation for large-scale cardiac model simulations.
Why the study?
The speed of mathematical function evaluations significantly affects numerical simulation performance, creating a need to evaluate when direct evaluation versus lookup tables is more efficient.
Lookup tables, particularly with cubic interpolation, significantly outperform direct function evaluation in large-scale numerical simulations of cardiac models.
Answers are grounded in this paper and cite their sources.
May guide optimization choices in simulations; leaves open hardware- and function-specific recommendations.
The speed of mathematical function evaluations can significantly contribute to the overall performance of numerical simulations. Two common approaches to evaluate a mathematical function are by direct evaluation or by means of lookup tables of precomputed values. Direct evaluation is the standard approach, and lookup tables are common in graphics applications and field-programmable gate array computing. We address the usage of direct function evaluation versus lookup tables for evaluating general univariate functions on general-purpose CPUs for large-scale numerical simulation. We introduce a small C++ library called FunC (for Function Comparator) that can be run on a given system to quickly and conveniently evaluate the performance of direct evaluation relative to various lookup table implementations for arbitrary user-specified functions. A user can then make an informed decision as to which method can be expected to be most efficient for their application. Using functions relevant to the Chaste software library for the simulation of cardiac models, FunC successfully predicts that lookup table implementations outperform direct evaluation. After implementing higher-order lookup tables in Chaste to test these predictions, we demonstrate the effects of table size on two simulations, one small and one large. For the small simulation, we see an increase in the simulation speed of up to 25% for tables using cubic interpolation over those using linear interpolation and up to 144% for cubic tables over direct evaluation. For the more realistic large simulation, we see an increase in the simulation speed by up to 86% for lookup tables over direct evaluation.
No takes yet. Share an insight, caveat, or question.
Green et al. (2019) studied Cardiac model simulations. Lookup tables vs. Direct function evaluation was evaluated on Simulation speed. Lookup tables increased simulation speed by up to 86% compared to direct evaluation for large-scale cardiac model simulations.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: