1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
/* Note: this file has been automatically generated.
DO NOT EDIT, or your changes WILL BE LOST! */
/* $Id: bench-libc.dox,v 1.2.2.1 2008/02/24 01:27:22 dmix Exp $ */
/** \page benchmarks
\section bench_libc A few of libc functions.
Avr-gcc version is 4.2.3
The size of function is given in view of all picked up functions. By default
Avr-libc is compiled with \c -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.
<small>
<table>
<tr>
<td width="50%"><strong>Function</strong></td>
<td width="20%"><strong>Units</strong></td>
<td width="10%"><strong>Avr2</strong></td>
<td width="10%"><strong>Avr25</strong></td>
<td width="10%"><strong>Avr4</strong></td>
</tr>
<tr>
<td> atoi ("12345")</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>82 (82)<br>2<br>155</td>
<td>78 (78)<br><br></td>
<td>74 (74)<br>2<br>149</td>
</tr>
<tr>
<td> atol ("12345")</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>122 (122)<br>2<br>221</td>
<td>118 (118)<br><br></td>
<td>118 (118)<br>2<br>219</td>
</tr>
<tr>
<td> dtostre (1.2345, s, 6, 0)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1184 (1072)<br>17<br>1313</td>
<td>1088 (978)<br><br></td>
<td>1088 (978)<br>17<br>1152</td>
</tr>
<tr>
<td> dtostrf (1.2345, 15, 6, s)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1676 (1564)<br>36<br>1608</td>
<td>1548 (1438)<br><br></td>
<td>1548 (1438)<br>36<br>1443</td>
</tr>
<tr>
<td> itoa (12345, s, 10)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>150 (150)<br>4<br>1172</td>
<td>134 (134)<br><br></td>
<td>134 (134)<br>4<br>1152</td>
</tr>
<tr>
<td> ltoa (12345L, s, 10)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>220 (220)<br>9<br>3174</td>
<td>200 (200)<br><br></td>
<td>200 (200)<br>9<br>3136</td>
</tr>
<tr>
<td> malloc (1)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>554 (554)<br>4<br>196</td>
<td>506 (506)<br><br></td>
<td>506 (506)<br>4<br>178</td>
</tr>
<tr>
<td> realloc ((void *)0, 1)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1152 (1040)<br>20<br>303</td>
<td>1042 (932)<br><br></td>
<td>1042 (932)<br>20<br>280</td>
</tr>
<tr>
<td> qsort (s, sizeof(s), 1, cmp)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1242 (1130)<br>38<br>20914</td>
<td>990 (880)<br><br></td>
<td>1008 (898)<br>38<br>16678</td>
</tr>
<tr>
<td> sprintf_min (s, "%d", 12345)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1216 (1104)<br>59<br>1846</td>
<td>1090 (980)<br><br></td>
<td>1086 (976)<br>59<br>1711</td>
</tr>
<tr>
<td> sprintf (s, "%d", 12345)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1674 (1562)<br>58<br>1610</td>
<td>1542 (1432)<br><br></td>
<td>1498 (1388)<br>58<br>1528</td>
</tr>
<tr>
<td> sprintf_flt (s, "%e", 1.2345)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>3334 (3222)<br>66<br>2513</td>
<td>3084 (2974)<br><br></td>
<td>3040 (2930)<br>66<br>2297</td>
</tr>
<tr>
<td> sscanf_min ("12345", "%d", &i)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1540 (1428)<br>55<br>1339</td>
<td>1354 (1244)<br><br></td>
<td>1354 (1244)<br>55<br>1240</td>
</tr>
<tr>
<td> sscanf ("12345", "%d", &i)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1950 (1838)<br>53<br>1334</td>
<td>1704 (1594)<br><br></td>
<td>1704 (1594)<br>53<br>1235</td>
</tr>
<tr>
<td> sscanf ("point,color", "%[a-z]", s)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1950 (1838)<br>87<br>2878</td>
<td>1704 (1594)<br><br></td>
<td>1704 (1594)<br>87<br>2718</td>
</tr>
<tr>
<td> sscanf_flt ("1.2345", "%e", &x)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>3298 (3186)<br>63<br>2187</td>
<td>2934 (2824)<br><br></td>
<td>2918 (2808)<br>63<br>1833</td>
</tr>
<tr>
<td> strtod ("1.2345", &p)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>1570 (1458)<br>22<br>1237</td>
<td>1472 (1362)<br><br></td>
<td>1456 (1346)<br>22<br>971</td>
</tr>
<tr>
<td> strtol ("12345", &p, 0)</td>
<td>Flash bytes<br>Stack bytes<br>MCU clocks</td>
<td>942 (830)<br>29<br>1074</td>
<td>874 (764)<br><br></td>
<td>808 (698)<br>21<br>722</td>
</tr>
</table>
</small>
*/
|