8000 Added code size · rprand/ArduinoJson@44e5549 · GitHub
[go: up one dir, main page]

Skip to content

Commit 44e5549

Browse files
committed
Added code size
1 parent 3e36831 commit 44e5549

File tree

1 file changed

+35
-18
lines changed

1 file changed

+35
-18
lines changed

JsonParser/README.md

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -213,21 +213,38 @@ Here are the size of the main classes of the library.
213213

214214
This table is for an 8-bit Arduino, types would be bigger on a 32-bit processor.
215215

216-
<table>
217-
<tr>
218-
<th>Type</th>
219-
<th>Size in bytes</th>
220-
</tr>
221-
<tr>
222-
<td>Parser&lt;N&gt;</td>
223-
<td>4 + 8 x N</td>
224-
</tr>
225-
<tr>
226-
<td>JsonArray</td>
227-
<td>4</td>
228-
</tr>
229-
<tr>
230-
<td>JsonObject</td>
231-
<td>4</td>
232-
</tr>
233-
</table>
216+
| Type | Size in bytes |
217+
| ------------ | ------------- |
218+
| `Parser<N>` | 4 + 8 x N |
219+
| `JsonArray` | 4 |
220+
| `JsonObject` | 4 |
221+
| `JsonValue` | 4 |
222+
223+
Code size
224+
---------
225+
226+
The sizes have been obtained with Arduino IDE 1.0.5 for a Duemilanove.
227+
228+
### Minimum setup
229+
230+
| Function | Size |
231+
| ------------------------------------ | ---- |
232+
| `jsmn_parse()` | 962 |
233+
| `JsonValue::operator[](char const*)` | 218 |
234+
| `JsonParserBase::parse()` | 116 |
235+
| `JsonValue::operator[](int)` | 108 |
236+
| `strcmp()` | 18 |
237+
238+
### Additional space for integers
239+
240+
| Function | Size |
241+
| ---------------------------- | ---- |
242+
| `strtol()` | 606 |
243+
| `JsonValue::operator long()` | 94 |
244+
245+
### Additional space for floating points
246+
247+
| Function | Size |
248+
| -------------------------------- | ----- |
249+
| `strtod()` | 1369 |
250+
| `JsonValue::operator double()` | 82 |

0 commit comments

Comments
 (0)
0