7 ms·
Agreed. Eigen can be relatively slow: in our Tiny Differentiable Simulator, with C++ templatized code, we generate C code using CppAdCodegen (by tracing a sim s
by erwincoumans 5y ago
Agreed. Eigen can be relatively slow: in our Tiny Differentiable Simulator, with C++ templatized code, we generate C code using CppAdCodegen (by tracing a sim step) which is easily 5 times faster than the original Eigen code. And together with openmp it runs very fast: Ant OpenAI gym simulation at 2 million steps per second on an AMD Ryzen 3900x at 12 cores/24 threads).
See the (unreadable) generated code from Eigen+CppAd Codegen here:
https://github.com/google-research/tiny-differentiable-simulator/blob/master/examples/environments/omp_model_ant_forward_zero.h https://github.com/google-research/tiny-differentiable-simul...