Skip to content

Commit 24fd329

Browse files
committed
Update README.md
1 parent 4c8249a commit 24fd329

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_small_payloa
181181
| mreiferson/go-ujson | **7008** | **1409** | 37 |
182182
| pquerna/ffjson | **3769** | **624** | **15** |
183183
| mailru/easyjson | **2002** | **192** | **9** |
184-
| buger/jsonparser | **1267** | **0** | **0** |
184+
| buger/jsonparser | **1367** | **0** | **0** |
185185

186186
Winners are ffjson, easyjson and jsonparser, where jsonparser is 5.5x faster then encoding/json and 2.8x faster then ffjson, and slightly faster then easyjson.
187187
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.
@@ -204,7 +204,7 @@ https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_medium_paylo
204204
| mreiferson/go-ujson | **56972** | 11547 | 270 |
205205
| pquerna/ffjson | **20298** | **856** | **20** |
206206
| mailru/easyjson | **10512** | **336** | **12** |
207-
| buger/jsonparser | **14560** | **0** | **0** |
207+
| buger/jsonparser | **15955** | **0** | **0** |
208208

209209
The difference between ffjson and jsonparser in CPU usage is smaller, while the memory consumption difference is growing. On the other hand `easyjson` shows remarkable performance for medium payload.
210210

@@ -226,7 +226,7 @@ https://github.com/buger/jsonparser/blob/master/benchmark/benchmark_large_payloa
226226
| encoding/json interface{} | 1224271 | 215425 | 3395 |
227227
| pquerna/ffjson | **312271** | **7792** | **298** |
228228
| mailru/easyjson | **154186** | **6992** | **288** |
229-
| buger/jsonparser | **79268** | **0** | **0** |
229+
| buger/jsonparser | **85308** | **0** | **0** |
230230

231231
`jsonparser` now is a winner, but do not forget that it is way more lighweight parser then `ffson` or `easyjson`, and they have to parser all the data, while `jsonparser` parse only what you need. All `ffjson`, `easysjon` and `jsonparser` have their own parsing code, and does not depend on `encoding/json` or `interface{}`, thats one of the reasons why they are so fast. `easyjson` also use a bit of `unsafe` package to reduce memory consuption (in theory it can lead to some unexpected GC issue, but i did not tested enough)
232232

0 commit comments

Comments
 (0)