# Benchmarks

The following tables present the running times of differentiation operations for a set of benchmark cases. For descriptions of the differentiation operations, please refer to API Overview.

The values are normalized with respect to the running time of the original function corresponding to each column. Operations diffn and diffn' are used with $$n=2$$, for enabling comparisons with diff2 and diff2'.

The benchmark functions are:

$f_{ss}(x) = l_{100}\; ,$

where $$l_{n + 1} = 4 l_{n} (1 - l_n)$$ and $$l_1 = x$$ (the logistic map), for the scalar-to-scalar case;

$f_{vs}(\mathbf{x}) = \mathbf{x}^{\textrm{T}} \left(\log \frac{\textbf{x}}{2}\right)\; ,$

where $$\log$$ and division by scalar is applied element-wise to vector $$\mathbf{x}$$, for the vector-to-scalar case; and

$f_{vv}(\mathbf{x}) = \left( \mathbf{x}^{\textrm{T}}\left(\log \frac{\textbf{x}}{2}\right),\, \textrm{sum}\{\exp\left(\sin\textbf{x}\right)\},\, \textrm{sum}\{\exp\left(\cos\textbf{x}\right)\}\right)\;$

for the vector-to-vector case.

The running times are averaged over 10000 calls to each operation, with vector size 100, on a PC with an Intel Core i7-4785T 2.2 GHz CPU and 16 GB RAM, running Windows 10 Build 10240 and .NET Framework 4.6.

Please note that the numbers for multivariate functions are highly dependent on the selected size of the input vector (i.e., independent variables). The Helmholtz Energy Function page demonstrates how the overhead factors scale as a function of the number of independent variables.

dsbench -vsize 100 -r 10000