You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-19Lines changed: 20 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Tiny, quick JSON encoding/decoding in pure Lua.
7
7
## Features
8
8
* Pure lua, should work on every version (5.1-5.4, JIT)
9
9
* Quick, focused on performance. (See benchmarks below)
10
-
*Actually tiny, ~150 sloc.
10
+
*Very small, ~180 sloc.
11
11
* Decent error handling: `Expected : to follow key for object at char 39`
12
12
13
13
## Usage
@@ -32,24 +32,24 @@ print(json.decode([[
32
32
* This does not guarantee 100% compatibility with the more niche parts of the JSON spec (like unicode escapes)
33
33
34
34
## Benchmarks
35
-
Using benchmarks/bench.lua:
35
+
Using benchmarks/bench.lua[(which tests the simdjson twitter example)](https://raw.githubusercontent.com/simdjson/simdjson/master/jsonexamples/twitter.json) through WSL:
From here, you can see this library is significantly faster on regular lua, and a bit slower than rxi/json on LuaJIT.
73
+
From here, you can see this library is significantly faster for `json.encode` in comparison to `json.decode`.
74
+
Additionally `decode` is faster on PUC-Lua than LuaJIT.
74
75
75
76
Currently working on making it faster for LuaJIT, but this is pretty hard to fix considering making it faster would require not using as many [lua patterns](https://www.lua.org/pil/20.2.html), which would slow down PUC-Lua.
0 commit comments