Function tabulation and wrapping
问题 I'm doing [very] intense numerical calculations related to physics using solvers written in C++. A single run can take up to few hours on my PC, and one need dozens. I've found that it is possible to significantly (2-5x) decrease the time almost without losing accuracy, if one tabulates smooth functions and uses tabulated values instead. The code below illustrates what do I mean: main.h #pragma once #include <iostream> #include <chrono> #include <math.h> #include <memory> typedef double(*fnc)