Skip to content

Commit 7266f2b

Browse files
authored
Merge pull request #96 from cshubhamrao/patch-2
Fix tables in README
2 parents 6bd1670 + 58f8f06 commit 7266f2b

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -246,19 +246,19 @@ Each test processes 190 bytes of http log as a JSON record.
246246
It should read multiple fields.
247247
https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_small_payload_test.go
248248

249-
| Library | time/op | bytes/op | allocs/op |
250-
| --- | --- | --- | --- | --- |
251-
| encoding/json struct | 7879 | 880 | 18 |
252-
| encoding/json interface{} | 8946 | 1521 | 38|
253-
| Jeffail/gabs | 10053 | 1649 | 46 |
254-
| bitly/go-simplejson | 10128 | 2241 | 36 |
255-
| antonholmquist/jason | 27152 | 7237 | 101 |
256-
| github.com/ugorji/go/codec | 8806 | 2176 | 31 |
257-
| mreiferson/go-ujson | **7008** | **1409** | 37 |
258-
| pquerna/ffjson | **3769** | **624** | **15** |
259-
| mailru/easyjson | **2002** | **192** | **9** |
260-
| buger/jsonparser | **1367** | **0** | **0** |
261-
| buger/jsonparser (EachKey API) | **809** | **0** | **0** |
249+
Library | time/op | bytes/op | allocs/op
250+
------ | ------- | -------- | -------
251+
encoding/json struct | 7879 | 880 | 18
252+
encoding/json interface{} | 8946 | 1521 | 38
253+
Jeffail/gabs | 10053 | 1649 | 46
254+
bitly/go-simplejson | 10128 | 2241 | 36
255+
antonholmquist/jason | 27152 | 7237 | 101
256+
github.com/ugorji/go/codec | 8806 | 2176 | 31
257+
mreiferson/go-ujson | **7008** | **1409** | 37
258+
pquerna/ffjson | **3769** | **624** | **15**
259+
mailru/easyjson | **2002** | **192** | **9**
260+
buger/jsonparser | **1367** | **0** | **0**
261+
buger/jsonparser (EachKey API) | **809** | **0** | **0**
262262

263263
Winners are ffjson, easyjson and jsonparser, where jsonparser is up to 9.8x faster than encoding/json and 4.6x faster than ffjson, and slightly faster than easyjson.
264264
If you look at memory allocation, jsonparser has no rivals, as it makes no data copy and operates with raw []byte structures and pointers to it.
@@ -271,7 +271,7 @@ It should read multiple nested fields and 1 array.
271271
https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_medium_payload_test.go
272272

273273
| Library | time/op | bytes/op | allocs/op |
274-
| --- | --- | --- | --- | --- |
274+
| ------- | ------- | -------- | --------- |
275275
| encoding/json struct | 57749 | 1336 | 29 |
276276
| encoding/json interface{} | 79297 | 10627 | 215 |
277277
| Jeffail/gabs | 83807 | 11202 | 235 |
@@ -299,7 +299,7 @@ Basically it means processing a full JSON file.
299299
https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_large_payload_test.go
300300

301301
| Library | time/op | bytes/op | allocs/op |
302-
| --- | --- | --- | --- | --- |
302+
| --- | --- | --- | --- |
303303
| encoding/json struct | 748336 | 8272 | 307 |
304304
| encoding/json interface{} | 1224271 | 215425 | 3395 |
305305
| pquerna/ffjson | **312271** | **7792** | **298** |

0 commit comments

Comments
 (0)