The results below can only give a rough estimate of the resources necessary for using certain library functions. There is a number of factors which can both increase or reduce the effort required\+:

\begin{DoxyItemize}
\item Expenses for preparation of operands and their stack are not considered.\end{DoxyItemize}
\begin{DoxyItemize}
\item In the table, the size includes all additional functions (for example, function to multiply two integers) but they are only linked from the library.\end{DoxyItemize}
\begin{DoxyItemize}
\item Expenses of time of performance of some functions essentially depend on parameters of a call, for example, \mbox{\hyperlink{stdlib_8h_afd4bf2faec43342e7ad3d2ab37bac1fe}{qsort()}} is recursive, and \mbox{\hyperlink{stdio_8h_a6017094d9fd800fa02600d35399f2a2a}{sprintf()}} receives parameters in a stack.\end{DoxyItemize}
\begin{DoxyItemize}
\item Different versions of the compiler can give a significant difference in code size and execution time. For example, the \mbox{\hyperlink{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}{dtostre()}} function, compiled with avr-\/gcc 3.\+4.\+6, requires 930 bytes. After transition to avr-\/gcc 4.\+2.\+3, the size become 1088 bytes.\end{DoxyItemize}
\hypertarget{benchmarks_bench_libc}{}\doxysubsection{A few of libc functions.}\label{benchmarks_bench_libc}
Avr-\/gcc version is 4.\+7.\+1

The size of function is given in view of all picked up functions. By default Avr-\/libc is compiled with {\ttfamily -\/mcall-\/prologues} option. In brackets the size without taking into account modules of a prologue and an epilogue is resulted. Both of the size can coincide, if function does not cause a prologue/epilogue.


\footnotesize  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{5}{|X[-1]}|}
\hline
{\bfseries{Function}} &{\bfseries{Units}} &{\bfseries{Avr2}} &{\bfseries{Avr25}} &{\bfseries{Avr4}}  \\\cline{1-5}
atoi (\char`\"{}12345\char`\"{}) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &82 (82)~\newline
2~\newline
155 &78 (78)~\newline
2~\newline
149 &74 (74)~\newline
2~\newline
149  \\\cline{1-5}
atol (\char`\"{}12345\char`\"{}) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &122 (122)~\newline
2~\newline
221 &118 (118)~\newline
2~\newline
219 &118 (118)~\newline
2~\newline
219  \\\cline{1-5}
dtostre (1.\+2345, s, 6, 0) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &1116 (1004)~\newline
17~\newline
1247 &1048 (938)~\newline
17~\newline
1105 &1048 (938)~\newline
17~\newline
1105  \\\cline{1-5}
dtostrf (1.\+2345, 15, 6, s) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &1616 (1616)~\newline
38~\newline
1634 &1508 (1508)~\newline
38~\newline
1462 &1508 (1508)~\newline
38~\newline
1462  \\\cline{1-5}
itoa (12345, s, 10) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &110 (110)~\newline
2~\newline
879 &102 (102)~\newline
2~\newline
875 &102 (102)~\newline
2~\newline
875  \\\cline{1-5}
ltoa (12345L, s, 10) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &134 (134)~\newline
2~\newline
1597 &126 (126)~\newline
2~\newline
1593 &126 (126)~\newline
2~\newline
1593  \\\cline{1-5}
malloc (1) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &768 (712)~\newline
6~\newline
215 &714 (660)~\newline
6~\newline
201 &714 (660)~\newline
6~\newline
201  \\\cline{1-5}
realloc ((void $\ast$)0, 1) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &1284 (1172)~\newline
18~\newline
305 &1174 (1064)~\newline
18~\newline
286 &1174 (1064)~\newline
18~\newline
286  \\\cline{1-5}
qsort (s, sizeof(s), 1, cmp) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &1252 (1140)~\newline
42~\newline
21996 &1022 (912)~\newline
42~\newline
19905 &1028 (918)~\newline
42~\newline
17541  \\\cline{1-5}
sprintf\+\_\+min (s, \char`\"{}\%d\char`\"{}, 12345) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &1224 (1112)~\newline
53~\newline
1841 &1092 (982)~\newline
53~\newline
1694 &1088 (978)~\newline
53~\newline
1689  \\\cline{1-5}
sprintf (s, \char`\"{}\%d\char`\"{}, 12345) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &1614 (1502)~\newline
58~\newline
1647 &1476 (1366)~\newline
58~\newline
1552 &1454 (1344)~\newline
58~\newline
1547  \\\cline{1-5}
sprintf\+\_\+flt (s, \char`\"{}\%e\char`\"{}, 1.\+2345) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &3228 (3116)~\newline
67~\newline
2573 &2990 (2880)~\newline
67~\newline
2311 &2968 (2858)~\newline
67~\newline
2311  \\\cline{1-5}
sscanf\+\_\+min (\char`\"{}12345\char`\"{}, \char`\"{}\%d\char`\"{}, \&i) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &1532 (1420)~\newline
55~\newline
1607 &1328 (1218)~\newline
55~\newline
1446 &1328 (1218)~\newline
55~\newline
1446  \\\cline{1-5}
sscanf (\char`\"{}12345\char`\"{}, \char`\"{}\%d\char`\"{}, \&i) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &2008 (1896)~\newline
55~\newline
1610 &1748 (1638)~\newline
55~\newline
1449 &1748 (1638)~\newline
55~\newline
1449  \\\cline{1-5}
sscanf (\char`\"{}point,color\char`\"{}, \char`\"{}\%\mbox{[}a-\/z\mbox{]}\char`\"{}, s) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &2008 (1896)~\newline
86~\newline
3067 &1748 (1638)~\newline
86~\newline
2806 &1748 (1638)~\newline
86~\newline
2806  \\\cline{1-5}
sscanf\+\_\+flt (\char`\"{}1.\+2345\char`\"{}, \char`\"{}\%e\char`\"{}, \&x) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &3464 (3352)~\newline
71~\newline
2497 &3086 (2976)~\newline
71~\newline
2281 &3070 (2960)~\newline
71~\newline
2078  \\\cline{1-5}
strtod (\char`\"{}1.\+2345\char`\"{}, \&p) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &1632 (1520)~\newline
20~\newline
1235 &1536 (1426)~\newline
20~\newline
1177 &1480 (1480)~\newline
21~\newline
1124  \\\cline{1-5}
strtol (\char`\"{}12345\char`\"{}, \&p, 0) &Flash bytes~\newline
Stack bytes~\newline
M\+CU clocks &918 (806)~\newline
22~\newline
956 &834 (724)~\newline
22~\newline
891 &792 (792)~\newline
28~\newline
794  \\\cline{1-5}
\end{longtabu}

\normalsize \hypertarget{benchmarks_bench_libm}{}\doxysubsection{Math functions.}\label{benchmarks_bench_libm}
The table contains the number of M\+CU clocks to calculate a function with a given argument(s). The main reason of a big difference between Avr2 and Avr4 is a hardware multiplication.

\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{3}{|X[-1]}|}
\hline
{\bfseries{Function}} &{\bfseries{Avr2}} &{\bfseries{Avr4}}  \\\cline{1-3}
\+\_\+\+\_\+addsf3 (1.\+234, 5.\+678) &113 &108  \\\cline{1-3}
\+\_\+\+\_\+mulsf3 (1.\+234, 5.\+678) &375 &138  \\\cline{1-3}
\+\_\+\+\_\+divsf3 (1.\+234, 5.\+678) &466 &465  \\\cline{1-3}
acos (0.\+54321) &4411 &2455  \\\cline{1-3}
asin (0.\+54321) &4517 &2556  \\\cline{1-3}
atan (0.\+54321) &4710 &2271  \\\cline{1-3}
atan2 (1.\+234, 5.\+678) &5270 &2857  \\\cline{1-3}
cbrt (1.\+2345) &2684 &2555  \\\cline{1-3}
ceil (1.\+2345) &177 &177  \\\cline{1-3}
cos (1.\+2345) &3387 &1671  \\\cline{1-3}
cosh (1.\+2345) &4922 &2979  \\\cline{1-3}
exp (1.\+2345) &4708 &2765  \\\cline{1-3}
fdim (5.\+678, 1.\+234) &111 &111  \\\cline{1-3}
floor (1.\+2345) &180 &180  \\\cline{1-3}
fmax (1.\+234, 5.\+678) &39 &37  \\\cline{1-3}
fmin (1.\+234, 5.\+678) &35 &35  \\\cline{1-3}
fmod (5.\+678, 1.\+234) &131 &131  \\\cline{1-3}
frexp (1.\+2345, 0) &42 &41  \\\cline{1-3}
hypot (1.\+234, 5.\+678) &1341 &866  \\\cline{1-3}
ldexp (1.\+2345, 6) &42 &42  \\\cline{1-3}
log (1.\+2345) &4142 &2134  \\\cline{1-3}
log10 (1.\+2345) &4498 &2260  \\\cline{1-3}
modf (1.\+2345, 0) &433 &429  \\\cline{1-3}
pow (1.\+234, 5.\+678) &9293 &5047  \\\cline{1-3}
round (1.\+2345) &150 &150  \\\cline{1-3}
sin (1.\+2345) &3353 &1653  \\\cline{1-3}
sinh (1.\+2345) &4946 &3003  \\\cline{1-3}
sqrt (1.\+2345) &494 &492  \\\cline{1-3}
tan (1.\+2345) &4381 &2426  \\\cline{1-3}
tanh (1.\+2345) &5126 &3173  \\\cline{1-3}
trunc (1.\+2345) &178 &178  \\\cline{1-3}
\end{longtabu}
