4 ms·
To follow up on what @zardo said, it's also not "double the amount of work" in a language like C++ on the coding side, because you just replace `float` or `doub
by erichocean 10y ago
To follow up on what @zardo said, it's also not "double the amount of work" in a language like C++ on the coding side, because you just replace `float` or `double` by your Dual number type and read off the derivatives as needed.
So, the "work" is almost nothing vs. computing derivatives by hand, which requires entirely different math. Furthermore, the actual CPU instructions are generally lower with a Dual implementation, usually because transcendentals and the like aren't computed over and over again—although this is obviously computation-dependent.
An example of a project that uses automatic differentiation in a really useful way is the Ceres Solver.[0]
[0] http://ceres-solver.org/ http://ceres-solver.org/