Skip to content

Commit

Permalink
Improve benchmark info in README
Browse files Browse the repository at this point in the history
  • Loading branch information
michalmuskala committed Dec 22, 2017
1 parent 6194eb1 commit 16ad1a2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

A blazing fast JSON parser and generator in pure Elixir.

The parser is usually twice as fast as `Poison` and only about 50% slower than
`jiffy` - which is implemented in C with NIFs. On some data, `Jason` can even
outperform `jiffy`. With HiPE, `Jason` consistently outperforms `jiffy` on
all inputs by 20-30%.

The generator is also usually twice as fast as `Poison` and uses less memory. It
is about 1.3 to 2.0 times slower than `jiffy` depending on input.
With HiPE `Jason` is 1.3 to even 2.5 times faster than `jiffy`.
The parser and generator are at least twice as fast as other Elixir/Erlang libraries
(most notably `Poison`).
The performance is comparable to `jiffy` - usually only twice as slow.
When compiled with HiPE both parser and generator outperform even `jiffy` - usually
by about 30%.

Both parser and generator fully conform to
[RFC 8259](https://tools.ietf.org/html/rfc8259) and
Expand Down Expand Up @@ -101,6 +98,12 @@ forward "/api",

## Benchmarks

Detailed comparison with jiffy in various situations: https://gist.github.com/michalmuskala/29112611873bdb2bd7d87e3351aa639a

Comparison with other Elixir and Erlang libraries: http://michal.muskala.eu/jason/decode.html and http://michal.muskala.eu/jason/encode.html

### Running

Benchmarks against most popular Elixir & Erlang json libraries can be executed
with `mix bench encode` and `mix bench decode`.
A HTML report of the benchmarks (after their execution) can be found in
Expand Down

0 comments on commit 16ad1a2

Please sign in to comment.