Browse Source

Merge pull request #61 from sile/update-benchmark

Update benchmark
Takeru Ohta 4 years ago
parent
commit
f771aef18f
6 changed files with 627 additions and 332 deletions
  1. 0 283
      BENCHMARK.md
  2. 43 49
      README.md
  3. 1 0
      benchmark/.gitignore
  4. 443 0
      benchmark/README.md
  5. 131 0
      benchmark/poison.patch
  6. 9 0
      benchmark/run.sh

+ 0 - 283
BENCHMARK.md

@@ -1,283 +0,0 @@
-Benchmark
-=========
-
-Environment
------------
-
-- OS: Ubuntu-16.04
-- CPU: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz (x2)
-- Erlang: OTP-19.0.2 ([package link](https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_19.0.2-1~ubuntu~xenial_amd64.deb))
-- Benchmark: [The benchmark of poison(v2.2.0)](https://github.com/devinus/poison/blob/2.2.0/README.md#benchmarking)
-
-Benchmarks
-----------
-
-To execute following commands, the [Elixir](http://elixir-lang.org/) is required.
-
-```sh
-###
-### Downloads poison
-###
-$ git clone https://github.com/devinus/poison
-$ cd poison
-$ git checkout 2.2.0
-
-
-###
-### Benchmark: Non HiPE
-###
-$ patch -p1 < jsone.patch
-$ mix deps.get
-$ MIX_ENV=bench mix compile
-$ MIX_ENV=bench mix bench
-Settings:
-duration:      1.0 s
-... abbrev ...
-Finished in 96.87 seconds
-
-## EncoderBench
-structs (Poison)               500000   6.51 µs/op
-maps (jiffy)                   500000   7.23 µs/op
-maps (jsone)                   100000   10.64 µs/op
-maps (Poison)                  100000   13.58 µs/op
-structs (Jazz)                 100000   13.96 µs/op
-structs (JSX)                  100000   15.78 µs/op
-maps (Jazz)                    100000   19.30 µs/op
-maps (JSX)                      50000   29.28 µs/op
-strings (jiffy)                 20000   98.80 µs/op
-lists (Poison)                  10000   109.30 µs/op
-string escaping (jiffy)         10000   144.01 µs/op
-lists (jsone)                   10000   157.39 µs/op
-lists (Jazz)                    10000   201.82 µs/op
-lists (jiffy)                   10000   210.40 µs/op
-strings (JSX)                   10000   262.18 µs/op
-lists (JSX)                      5000   357.25 µs/op
-strings (Jazz)                   5000   399.89 µs/op
-jiffy                            5000   408.03 µs/op
-strings (Poison)                 5000   416.78 µs/op
-jiffy (pretty)                   5000   420.94 µs/op
-strings (jsone)                  5000   595.63 µs/op
-string escaping (jsone)          2000   732.44 µs/op
-string escaping (Jazz)           1000   1197.06 µs/op
-string escaping (Poison)         1000   1318.82 µs/op
-string escaping (JSX)            1000   1324.04 µs/op
-Poison                           1000   1447.71 µs/op
-Poison (pretty)                  1000   1534.74 µs/op
-jsone                            1000   1556.85 µs/op
-jsone (pretty)                   1000   1686.55 µs/op
-Jazz                             1000   1824.05 µs/op
-Jazz (pretty)                    1000   2041.22 µs/op
-JSX                              1000   2184.59 µs/op
-JSX (pretty)                      500   5533.04 µs/op
-
-## ParserBench
-UTF-8 unescaping (jiffy)        50000   63.01 µs/op
-UTF-8 unescaping (Poison)       10000   249.70 µs/op
-UTF-8 unescaping (JSX)          10000   281.84 µs/op
-UTF-8 unescaping (jsone)         5000   399.38 µs/op
-jiffy                            5000   544.84 µs/op
-jsone                            1000   1364.38 µs/op
-Poison                           1000   1401.35 µs/op
-JSX                              1000   1844.55 µs/op
-
-
-###
-### Benchmark: HiPE
-###
-$ mix clean --deps && find . -name '*.beam' | xargs rm
-$ ERL_COMPILER_OPTIONS="native" MIX_ENV=bench mix compile
-$ MIX_ENV=bench mix bench
-Settings:
-duration:      1.0 s
-... abbrev ...
-Finished in 102.75 seconds
-
-## EncoderBench
-maps (jsone)                   500000   6.12 µs/op
-structs (Poison)               500000   6.49 µs/op
-maps (jiffy)                   500000   7.69 µs/op
-maps (Poison)                  100000   12.32 µs/op
-structs (JSX)                  100000   13.51 µs/op
-structs (Jazz)                 100000   15.06 µs/op
-maps (Jazz)                    100000   22.90 µs/op
-maps (JSX)                     100000   27.03 µs/op
-lists (jsone)                   50000   69.93 µs/op
-lists (Poison)                  20000   79.04 µs/op
-strings (jiffy)                 20000   96.67 µs/op
-strings (Poison)                10000   142.43 µs/op
-string escaping (jiffy)         10000   146.85 µs/op
-strings (JSX)                   10000   179.96 µs/op
-lists (jiffy)                   10000   207.75 µs/op
-lists (Jazz)                    10000   229.95 µs/op
-lists (JSX)                     10000   278.01 µs/op
-strings (Jazz)                   5000   310.10 µs/op
-string escaping (jsone)          5000   317.10 µs/op
-strings (jsone)                  5000   321.69 µs/op
-jiffy                            5000   409.73 µs/op
-jiffy (pretty)                   5000   419.55 µs/op
-jsone                            5000   664.34 µs/op
-jsone (pretty)                   5000   724.28 µs/op
-string escaping (JSX)            2000   767.67 µs/op
-Poison                           2000   806.24 µs/op
-Poison (pretty)                  2000   844.76 µs/op
-string escaping (Poison)         1000   1277.54 µs/op
-string escaping (Jazz)           1000   1311.85 µs/op
-Jazz                             1000   1630.21 µs/op
-JSX                              1000   1777.62 µs/op
-Jazz (pretty)                    1000   1888.71 µs/op
-JSX (pretty)                      500   4872.34 µs/op
-
-## ParserBench
-UTF-8 unescaping (jiffy)        50000   62.42 µs/op
-UTF-8 unescaping (jsone)        20000   92.63 µs/op
-UTF-8 unescaping (Poison)       10000   118.97 µs/op
-UTF-8 unescaping (JSX)          10000   172.07 µs/op
-jiffy                            5000   542.77 µs/op
-jsone                            5000   561.15 µs/op
-Poison                           5000   751.36 µs/op
-JSX                              1000   1435.10 µs/op
-```
-
-Libraries Version
------------------
-
-mix.lock:
-```elixir
-%{"benchfella": {:hex, :benchfella, "0.3.2"},
-  "earmark": {:hex, :earmark, "0.2.1"},
-  "ex_doc": {:hex, :ex_doc, "0.12.0"},
-  "exjsx": {:git, "https://github.com/talentdeficit/exjsx.git", "202b2ee1b274511973de60e9fdfed218d3b5eecc", []},
-  "jazz": {:git, "https://github.com/meh/jazz.git", "49f335492aca5516495199dd81dd18b845ebaa69", []},
-  "jiffy": {:git, "https://github.com/davisp/jiffy.git", "330f41c486cf949707eb494b855634df324a6d92", []},
-  "jsone": {:hex, :jsone, "1.2.6"},
-  "jsx": {:hex, :jsx, "2.6.2"}}
-```
-
-Patches
--------
-
-jsone.patch:
-```patch
-diff --git a/bench/encoder_bench.exs b/bench/encoder_bench.exs
-index cf40dcd..3453a2d 100644
---- a/bench/encoder_bench.exs
-+++ b/bench/encoder_bench.exs
-@@ -10,6 +10,10 @@ defmodule EncoderBench do
-     :jiffy.encode(list)
-   end
-
-+  bench "lists (jsone)", [list: gen_list] do
-+    :jsone.encode(list)
-+  end
-+
-   bench "lists (JSX)", [list: gen_list] do
-     JSX.encode!(list)
-   end
-@@ -27,6 +31,10 @@ defmodule EncoderBench do
-     :jiffy.encode(map)
-   end
-
-+  bench "maps (jsone)", [map: gen_map] do
-+    :jsone.encode(map)
-+  end
-+
-   bench "maps (JSX)", [map: gen_map] do
-     JSX.encode!(map)
-   end
-@@ -44,6 +52,10 @@ defmodule EncoderBench do
-     :jiffy.encode(string)
-   end
-
-+  bench "strings (jsone)", [string: gen_string] do
-+    :jsone.encode(string, [:native_utf8])
-+  end
-+
-   bench "strings (JSX)", [string: gen_string] do
-     JSX.encode!(string)
-   end
-@@ -61,6 +73,10 @@ defmodule EncoderBench do
-     :jiffy.encode(string, [:uescape])
-   end
-
-+  bench "string escaping (jsone)", [string: gen_string] do
-+    :jsone.encode(string)
-+  end
-+
-   bench "string escaping (JSX)", [string: gen_string] do
-     JSX.encode!(string, [:uescape])
-   end
-@@ -90,6 +106,10 @@ defmodule EncoderBench do
-     :jiffy.encode(data)
-   end
-
-+  bench "jsone", [data: gen_data] do
-+    :jsone.encode(data)
-+  end
-+
-   bench "JSX", [data: gen_data] do
-     JSX.encode!(data)
-   end
-@@ -106,6 +126,10 @@ defmodule EncoderBench do
-     :jiffy.encode(data, [:pretty])
-   end
-
-+  bench "jsone (pretty)", [data: gen_data] do
-+    :jsone.encode(data, [{:indent, 1}, {:space, 2}])
-+  end
-+
-   bench "JSX (pretty)", [data: gen_data] do
-     JSX.encode!(data) |> JSX.prettify!
-   end
-diff --git a/bench/parser_bench.exs b/bench/parser_bench.exs
-index a71fbff..114f226 100644
---- a/bench/parser_bench.exs
-+++ b/bench/parser_bench.exs
-@@ -12,6 +12,10 @@ defmodule ParserBench do
-     :jiffy.decode(json, [:return_maps])
-   end
-
-+  bench "jsone", [json: gen_json] do
-+    :jsone.decode(json)
-+  end
-+
-   bench "JSX", [json: gen_json] do
-     JSX.decode!(json, [:strict])
-   end
-@@ -25,6 +29,10 @@ defmodule ParserBench do
-     :jiffy.decode(utf8)
-   end
-
-+  bench "UTF-8 unescaping (jsone)", [utf8: gen_utf8] do
-+    :jsone.decode(utf8)
-+  end
-+
-   bench "UTF-8 unescaping (JSX)", [utf8: gen_utf8] do
-     JSX.decode!(utf8, [:strict])
-   end
-diff --git a/config/config.exs b/config/config.exs
-index 1240a78..d176e11 100644
---- a/config/config.exs
-+++ b/config/config.exs
-@@ -15,7 +15,8 @@ use Mix.Config
- #       format: "$time $metadata[$level] $message\n"
-
- config :poison,
--  native: :erlang.system_info(:hipe_architecture) != :undefined
-+#  native: :erlang.system_info(:hipe_architecture) != :undefined
-+  native: false
-
- # It is also possible to import configuration files, relative to this
- # directory. For example, you can emulate configuration per environment
-diff --git a/mix.exs b/mix.exs
-index 89a8c10..ac2f53e 100644
---- a/mix.exs
-+++ b/mix.exs
-@@ -33,6 +33,7 @@ defmodule Poison.Mixfile do
-     [{:earmark, "~> 0.2", only: :docs},
-      {:ex_doc, "~> 0.11", only: :docs},
-      {:benchfella, "~> 0.3", only: :bench},
-+     {:jsone, "~> 1.2.6", only: :bench},
-      {:jiffy, github: "davisp/jiffy", only: :bench},
-      {:exjsx, github: "talentdeficit/exjsx", only: :bench},
-      {:jazz, github: "meh/jazz", only: :bench}]
-```

+ 43 - 49
README.md

@@ -17,7 +17,7 @@ Features
 - Pure Erlang
 - Highly Efficient
   - Maybe one of the fastest JSON library (except those which are implemented in NIF)
-      - See [Benchmark](#benchmark)
+      - See [Benchmark](benchmark/README.md)
   - Decode function is written in continuation-passing style(CPS)
       - CPS facilitates application of 'creation of sub binary delayed' optimization
       - See also [Erlang Efficiency Guide](http://www.erlang.org/doc/efficiency_guide/binaryhandling.html)
@@ -228,55 +228,49 @@ Benchmark
 
 The results of [poison](https://github.com/devinus/poison) benchmarking.
 
-See the [BENCHMARK.md](BENCHMARK.md) file for more information.
+See the [benchmark/README.md](benchmark/README.md) file for more information.
+
+### Encoding (Unit: IPS=inputs per second)
+
+| Input data \ Library | Jason      | jiffy       | JSON*  | jsone      | JSX    | Poison | Tiny   |
+|----------------------|-----------:|------------:|-------:|-----------:|-------:|-------:|-------:|
+| [Blockchain]         |     2.77 K |  **4.55 K** | 0.45 K | 1.44 K (3) | 0.60 K | 1.30 K | 0.99 K |
+| [Giphy]              |     230.65 |  **487.67** |  47.73 | 114.57 (4) |  44.97 | 114.57 | 113.59 |
+| [GitHub]             |     880.03 | **1566.67** | 139.79 | 300.26 (5) |  99.68 | 424.75 | 455.07 |
+| [GovTrack]           |       6.57 |   **24.92** |   2.33 |   5.35 (5) |   2.65 |   7.06 |   7.86 |
+| [Issue 90]           |  **22.80** |       21.92 |   0.77 |  14.30 (3) |   5.33 |  12.60 |  12.95 |
+| [JSON Generateor]    |     200.40 |  **606.81** |  42.45 | 147.12 (4) |  68.73 | 187.95 | 123.93 |
+| [Pokedex]            |     209.51 |  **776.67** |  62.60 | 161.45 (4) |  69.87 | 190.93 | 125.16 |
+| [UTF-8 unescaped]    |     626.25 | **6644.53** |1167.89 | 582.41 (4) | 273.48 | 401.44 | 220.14 |
+
+\* Only `JSON` didn't escape non-ASCII unicode characters on the encoding
+
+[Blockchain]: https://github.com/devinus/poison/blob/4.0.1/bench/data/blockchain.json
+[Giphy]: https://github.com/devinus/poison/blob/4.0.1/bench/data/giphy.json
+[GitHub]: https://github.com/devinus/poison/blob/4.0.1/bench/data/github.json
+[GovTrack]: https://github.com/devinus/poison/blob/4.0.1/bench/data/govtrack.json
+[Issue 90]: https://github.com/devinus/poison/blob/4.0.1/bench/data/issue-90.json
+[JSON Generateor]: https://github.com/devinus/poison/blob/4.0.1/bench/data/json-generator.json
+[JSON Generateor (Pretty)]: https://github.com/devinus/poison/blob/4.0.1/bench/data/json-generator-pretty.json
+[Pokedex]: https://github.com/devinus/poison/blob/4.0.1/bench/data/pokedex.json
+[UTF-8 escaped]: https://github.com/devinus/poison/blob/4.0.1/bench/data/utf-8-escaped.json
+[UTF-8 unescaped]: https://github.com/devinus/poison/blob/4.0.1/bench/data/utf-8-unescaped.json
+
+### Decoding (Unit: IPS=inputs per second)
+
+| Input data \ Library       | Jason      | jiffy       | JSON   | jsone      | JSX    | Poison | Tiny   |
+|----------------------------|-----------:|------------:|-------:|-----------:|-------:|-------:|-------:|
+| [Blockchain]               | **2.75 K** |      2.62 K | 0.35 K | 2.21 K (3) | 0.89 K | 1.32 K | 1.49 K |
+| [Giphy]                    |     212.18 |  **243.45** |  35.67 | 109.11 (5) |  64.32 | 110.76 | 114.54 |
+| [GitHub]                   |     973.41 | **1052.94** | 137.02 | 662.39 (3) | 271.97 | 438.79 | 542.67 |
+| [GovTrack]                 |  **10.77** |        8.32 |   0.80 |   5.08 (3) |   2.81 |   3.58 |   3.65 |
+| [Issue 90]                 |      17.85 |   **41.16** |   0.88 |  10.79 (5) |   6.02 |  13.63 |  14.03 |
+| [JSON Generateor]          | **320.79** |      243.93 |  25.16 | 184.23 (3) | 111.24 | 135.47 | 139.78 |
+| [JSON Generateor (Pretty)] | **273.57** |      205.09 |  25.04 | 158.82 (3) |  97.93 | 123.31 | 136.65 |
+| [Pokedex]                  | **527.63** |      285.43 |  33.70 | 245.36 (3) | 140.90 | 172.45 | 152.59 |
+| [UTF-8 escaped]            |    1224.48 | **7923.08** | 326.43 | 573.70 (4) | 550.36 | 918.21 | 520.31 |
+| [UTF-8 unescaped]          |     5.56 K | **12.54 K** | 1.35 K | 5.09 K (3) | 3.30 K | 4.39 K | 1.46 K |
 
-### EncoderBench Result
-
-__Non HiPE__:
-
-|                  | jiffy        | jsone             | poison        | jazz          | jsx           |
-|:-----------------|-------------:|------------------:|--------------:|--------------:|--------------:|
-| maps             |   7.23 μs/op |   10.64 μs/op (2) |   13.58 μs/op |   19.30 μs/op |   29.28 μs/op |
-| lists            | 210.40 μs/op |  157.39 μs/op (3) |  109.30 μs/op |  201.82 μs/op |  357.25 μs/op |
-| strings*         |  98.80 μs/op |  595.63 μs/op (5) |  416.78 μs/op |  399.89 μs/op |  262.18 μs/op |
-| string escaping* | 144.01 μs/op |  732.44 μs/op (2) | 1318.82 μs/op | 1197.06 μs/op | 1324.04 μs/op |
-| large value**    | 408.03 μs/op | 1556.85 μs/op (3) | 1447.71 μs/op | 1824.05 μs/op | 2184.59 μs/op |
-| pretty print**   | 420.94 μs/op | 1686.55 μs/op (3) | 1534.74 μs/op | 2041.22 μs/op | 5533.04 μs/op |
-
-
-__HiPE__:
-
-|                  | jiffy        | jsone             | poison        | jazz          | jsx           |
-|:-----------------|-------------:|------------------:|--------------:|--------------:|--------------:|
-| maps             |   7.69 μs/op |    6.12 μs/op (1) |   12.32 μs/op |   22.90 μs/op |   27.03 μs/op |
-| lists            | 207.75 μs/op |   69.93 μs/op (1) |   79.04 μs/op |  229.95 μs/op |  278.01 μs/op |
-| strings*         |  96.67 μs/op |  321.69 μs/op (5) |  142.43 μs/op |  310.10 μs/op |  179.96 μs/op |
-| string escaping* | 146.85 μs/op |  317.10 μs/op (2) | 1277.54 μs/op | 1311.85 μs/op |  767.67 μs/op |
-| large value**    | 409.73 μs/op |  664.34 μs/op (2) |  806.24 μs/op | 1630.21 μs/op | 1777.62 μs/op |
-| pretty print**   | 419.55 μs/op |  724.28 μs/op (2) |  844.76 μs/op | 1888.71 μs/op | 4872.34 μs/op |
-
-\* binary representation of [UTF-8-demo.txt](https://github.com/devinus/poison/blob/2.1.0/bench/data/UTF-8-demo.txt)  <br />
-\** [generated.json](https://github.com/devinus/poison/blob/2.1.0/bench/data/generated.json)
-
-### ParserBench Result
-
-__Non HiPE__:
-
-|                    | jiffy        | jsone             | poison        | jsx           |
-|:-------------------|-------------:|------------------:|--------------:|--------------:|
-| json value*        | 544.84 μs/op | 1364.38 μs/op (2) | 1401.35 μs/op | 1844.55 μs/op |
-| UTF-8 unescaping** |  63.01 μs/op |  399.38 μs/op (4) |  249.70 μs/op |  281.84 μs/op |
-
-
-__HiPE__:
-
-|                    | jiffy        | jsone             | poison        | jsx           |
-|:-------------------|-------------:|------------------:|--------------:|--------------:|
-| json value*        | 542.77 μs/op |  561.15 μs/op (2) |  751.36 μs/op | 1435.10 μs/op |
-| UTF-8 unescaping** |  62.42 μs/op |   92.63 μs/op (2) |  118.97 μs/op |  172.07 μs/op |
-
-\* [generated.json](https://github.com/devinus/poison/blob/2.1.0/bench/data/generated.json) <br />
-\** [UTF-8-demo.txt](https://github.com/devinus/poison/blob/2.1.0/bench/data/UTF-8-demo.txt)
 
 License
 -------

+ 1 - 0
benchmark/.gitignore

@@ -0,0 +1 @@
+poison/

+ 443 - 0
benchmark/README.md

@@ -0,0 +1,443 @@
+Benchmark
+=========
+
+Using [poision](https://github.com/devinus/poison)'s benchmark.
+Please execute the `./run.sh` script in this directory to run the benchmark.
+
+Benchmark Result
+----------------
+
+Version:
+- OTP-24
+- jsone: [v1.6.0](https://github.com/sile/jsone/releases/tag/1.6.0)
+
+Summary
+-------
+
+### Encoding (Unit: IPS=inputs per second)
+
+| Input data \ Library | Jason      | jiffy       | JSON*  | jsone      | JSX    | Poison | Tiny   |
+|----------------------|-----------:|------------:|-------:|-----------:|-------:|-------:|-------:|
+| [Blockchain]         |     2.77 K |  **4.55 K** | 0.45 K | 1.44 K (3) | 0.60 K | 1.30 K | 0.99 K |
+| [Giphy]              |     230.65 |  **487.67** |  47.73 | 114.57 (4) |  44.97 | 114.57 | 113.59 |
+| [GitHub]             |     880.03 | **1566.67** | 139.79 | 300.26 (5) |  99.68 | 424.75 | 455.07 |
+| [GovTrack]           |       6.57 |   **24.92** |   2.33 |   5.35 (5) |   2.65 |   7.06 |   7.86 |
+| [Issue 90]           |  **22.80** |       21.92 |   0.77 |  14.30 (3) |   5.33 |  12.60 |  12.95 |
+| [JSON Generateor]    |     200.40 |  **606.81** |  42.45 | 147.12 (4) |  68.73 | 187.95 | 123.93 |
+| [Pokedex]            |     209.51 |  **776.67** |  62.60 | 161.45 (4) |  69.87 | 190.93 | 125.16 |
+| [UTF-8 unescaped]    |     626.25 | **6644.53** |1167.89 | 582.41 (4) | 273.48 | 401.44 | 220.14 |
+
+\* Only `JSON` didn't escape non-ASCII unicode characters on the encoding
+
+[Blockchain]: https://github.com/devinus/poison/blob/4.0.1/bench/data/blockchain.json
+[Giphy]: https://github.com/devinus/poison/blob/4.0.1/bench/data/giphy.json
+[GitHub]: https://github.com/devinus/poison/blob/4.0.1/bench/data/github.json
+[GovTrack]: https://github.com/devinus/poison/blob/4.0.1/bench/data/govtrack.json
+[Issue 90]: https://github.com/devinus/poison/blob/4.0.1/bench/data/issue-90.json
+[JSON Generateor]: https://github.com/devinus/poison/blob/4.0.1/bench/data/json-generator.json
+[JSON Generateor (Pretty)]: https://github.com/devinus/poison/blob/4.0.1/bench/data/json-generator-pretty.json
+[Pokedex]: https://github.com/devinus/poison/blob/4.0.1/bench/data/pokedex.json
+[UTF-8 escaped]: https://github.com/devinus/poison/blob/4.0.1/bench/data/utf-8-escaped.json
+[UTF-8 unescaped]: https://github.com/devinus/poison/blob/4.0.1/bench/data/utf-8-unescaped.json
+
+### Decoding (Unit: IPS=inputs per second)
+
+| Input data \ Library       | Jason      | jiffy       | JSON   | jsone      | JSX    | Poison | Tiny   |
+|----------------------------|-----------:|------------:|-------:|-----------:|-------:|-------:|-------:|
+| [Blockchain]               | **2.75 K** |      2.62 K | 0.35 K | 2.21 K (3) | 0.89 K | 1.32 K | 1.49 K |
+| [Giphy]                    |     212.18 |  **243.45** |  35.67 | 109.11 (5) |  64.32 | 110.76 | 114.54 |
+| [GitHub]                   |     973.41 | **1052.94** | 137.02 | 662.39 (3) | 271.97 | 438.79 | 542.67 |
+| [GovTrack]                 |  **10.77** |        8.32 |   0.80 |   5.08 (3) |   2.81 |   3.58 |   3.65 |
+| [Issue 90]                 |      17.85 |   **41.16** |   0.88 |  10.79 (5) |   6.02 |  13.63 |  14.03 |
+| [JSON Generateor]          | **320.79** |      243.93 |  25.16 | 184.23 (3) | 111.24 | 135.47 | 139.78 |
+| [JSON Generateor (Pretty)] | **273.57** |      205.09 |  25.04 | 158.82 (3) |  97.93 | 123.31 | 136.65 |
+| [Pokedex]                  | **527.63** |      285.43 |  33.70 | 245.36 (3) | 140.90 | 172.45 | 152.59 |
+| [UTF-8 escaped]            |    1224.48 | **7923.08** | 326.43 | 573.70 (4) | 550.36 | 918.21 | 520.31 |
+| [UTF-8 unescaped]          |     5.56 K | **12.54 K** | 1.35 K | 5.09 K (3) | 3.30 K | 4.39 K | 1.46 K |
+
+
+Details
+-------
+
+```
+$ ./run.sh
+
+##
+## Encoding
+##
+Operating System: Linux
+CPU Information: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
+Number of Available Cores: 12
+Available memory: 24.68 GB
+Elixir 1.7.4
+Erlang 24.0.2
+
+Benchmark suite executing with the following configuration:
+warmup: 2 s
+time: 5 s
+memory time: 0 ns
+parallel: 4
+inputs: Blockchain, Giphy, GitHub, GovTrack, Issue 90, JSON Generator, Pokedex, UTF-8 unescaped
+Estimated total run time: 6.53 min
+
+##### With input Blockchain #####
+Name                                ips        average  deviation         median         99th %
+jiffy                            4.55 K      219.79 μs   ±227.93%      159.30 μs      600.33 μs
+Jason                            2.77 K      361.51 μs   ±280.89%      164.50 μs     6000.18 μs
+jsone                            1.44 K      692.75 μs   ±202.11%      303.80 μs     6609.40 μs
+Poison                           1.30 K      769.30 μs   ±208.79%      324.50 μs     7034.96 μs
+Tiny                             0.99 K     1009.25 μs   ±187.05%      312.70 μs     7021.59 μs
+JSX                              0.60 K     1677.61 μs   ±125.78%         818 μs     8187.88 μs
+JSON (w/o unicode escape)        0.45 K     2198.45 μs   ±116.54%     1010.80 μs     9246.82 μs
+
+Comparison:
+jiffy                            4.55 K
+Jason                            2.77 K - 1.64x slower +141.72 μs
+jsone                            1.44 K - 3.15x slower +472.95 μs
+Poison                           1.30 K - 3.50x slower +549.50 μs
+Tiny                             0.99 K - 4.59x slower +789.45 μs
+JSX                              0.60 K - 7.63x slower +1457.82 μs
+JSON (w/o unicode escape)        0.45 K - 10.00x slower +1978.65 μs
+
+##### With input Giphy #####
+Name                                ips        average  deviation         median         99th %
+jiffy                            487.67        2.05 ms    ±78.70%        1.54 ms        8.92 ms
+Jason                            230.65        4.34 ms    ±70.26%        2.06 ms       10.43 ms
+Poison                           141.49        7.07 ms    ±47.75%        7.49 ms       13.94 ms
+jsone                            114.57        8.73 ms    ±29.15%        9.66 ms       12.39 ms
+Tiny                             113.59        8.80 ms    ±33.13%        9.65 ms       14.60 ms
+JSON (w/o unicode escape)         47.73       20.95 ms    ±25.23%       21.45 ms       45.18 ms
+JSX                               44.97       22.24 ms     ±5.54%       22.17 ms       25.09 ms
+
+Comparison:
+jiffy                            487.67
+Jason                            230.65 - 2.11x slower +2.29 ms
+Poison                           141.49 - 3.45x slower +5.02 ms
+jsone                            114.57 - 4.26x slower +6.68 ms
+Tiny                             113.59 - 4.29x slower +6.75 ms
+JSON (w/o unicode escape)         47.73 - 10.22x slower +18.90 ms
+JSX                               44.97 - 10.85x slower +20.19 ms
+
+##### With input GitHub #####
+Name                                ips        average  deviation         median         99th %
+jiffy                           1566.67        0.64 ms   ±125.06%        0.49 ms        6.57 ms
+Jason                            880.03        1.14 ms   ±157.00%        0.53 ms        7.18 ms
+Tiny                             455.07        2.20 ms   ±111.76%        0.98 ms        8.56 ms
+Poison                           424.75        2.35 ms   ±104.47%        1.11 ms        8.72 ms
+jsone                            300.26        3.33 ms    ±83.98%        1.52 ms        9.15 ms
+JSON (w/o unicode escape)        139.79        7.15 ms    ±46.69%        8.63 ms       13.20 ms
+JSX                               99.68       10.03 ms    ±17.20%        9.80 ms       19.04 ms
+
+Comparison:
+jiffy                           1566.67
+Jason                            880.03 - 1.78x slower +0.50 ms
+Tiny                             455.07 - 3.44x slower +1.56 ms
+Poison                           424.75 - 3.69x slower +1.72 ms
+jsone                            300.26 - 5.22x slower +2.69 ms
+JSON (w/o unicode escape)        139.79 - 11.21x slower +6.52 ms
+JSX                               99.68 - 15.72x slower +9.39 ms
+
+##### With input GovTrack #####
+Name                                ips        average  deviation         median         99th %
+jiffy                             24.92       40.13 ms    ±17.28%       37.63 ms       65.87 ms
+Tiny                               7.86      127.26 ms    ±16.34%      120.95 ms      202.01 ms
+Poison                             7.06      141.71 ms    ±17.46%      141.24 ms      230.78 ms
+Jason                              6.57      152.32 ms    ±29.45%      166.96 ms      221.99 ms
+jsone                              5.35      186.87 ms    ±14.14%      193.19 ms      210.20 ms
+JSX                                2.65      376.97 ms     ±9.89%      372.41 ms      458.19 ms
+JSON (w/o unicode escape)          2.33      429.24 ms    ±10.80%      425.02 ms      535.64 ms
+
+Comparison:
+jiffy                             24.92
+Tiny                               7.86 - 3.17x slower +87.13 ms
+Poison                             7.06 - 3.53x slower +101.58 ms
+Jason                              6.57 - 3.80x slower +112.20 ms
+jsone                              5.35 - 4.66x slower +146.75 ms
+JSX                                2.65 - 9.39x slower +336.85 ms
+JSON (w/o unicode escape)          2.33 - 10.70x slower +389.12 ms
+
+##### With input Issue 90 #####
+Name                                ips        average  deviation         median         99th %
+Jason                             22.80       43.87 ms    ±24.63%       40.02 ms       75.01 ms
+jiffy                             21.92       45.62 ms    ±19.38%       41.89 ms       77.27 ms
+jsone                             14.30       69.94 ms    ±15.61%       67.54 ms      133.58 ms
+Tiny                              12.95       77.24 ms    ±20.56%       72.77 ms      124.05 ms
+Poison                            12.60       79.39 ms    ±21.64%       75.25 ms      136.51 ms
+JSX                                5.33      187.61 ms    ±12.43%      180.47 ms      285.20 ms
+JSON (w/o unicode escape)          0.77     1297.79 ms    ±11.08%     1252.49 ms     1612.29 ms
+
+Comparison:
+Jason                             22.80
+jiffy                             21.92 - 1.04x slower +1.75 ms
+jsone                             14.30 - 1.59x slower +26.07 ms
+Tiny                              12.95 - 1.76x slower +33.37 ms
+Poison                            12.60 - 1.81x slower +35.52 ms
+JSX                                5.33 - 4.28x slower +143.74 ms
+JSON (w/o unicode escape)          0.77 - 29.58x slower +1253.92 ms
+
+##### With input JSON Generator #####
+Name                                ips        average  deviation         median         99th %
+jiffy                            606.81        1.65 ms    ±67.68%        1.34 ms        7.17 ms
+Jason                            200.40        4.99 ms    ±67.53%        2.64 ms       10.38 ms
+Poison                           187.95        5.32 ms    ±57.09%        3.26 ms       12.65 ms
+jsone                            147.12        6.80 ms    ±44.42%        8.28 ms       11.48 ms
+Tiny                             123.93        8.07 ms    ±42.50%        9.39 ms       15.41 ms
+JSX                               68.73       14.55 ms    ±20.50%       13.50 ms       20.39 ms
+JSON (w/o unicode escape)         42.45       23.56 ms    ±19.94%       24.33 ms       32.94 ms
+
+Comparison:
+jiffy                            606.81
+Jason                            200.40 - 3.03x slower +3.34 ms
+Poison                           187.95 - 3.23x slower +3.67 ms
+jsone                            147.12 - 4.12x slower +5.15 ms
+Tiny                             123.93 - 4.90x slower +6.42 ms
+JSX                               68.73 - 8.83x slower +12.90 ms
+JSON (w/o unicode escape)         42.45 - 14.29x slower +21.91 ms
+
+##### With input Pokedex #####
+Name                                ips        average  deviation         median         99th %
+jiffy                            776.67        1.29 ms    ±87.38%        0.99 ms        6.88 ms
+Jason                            209.51        4.77 ms    ±65.87%        2.54 ms       11.37 ms
+Poison                           190.93        5.24 ms    ±53.42%        3.18 ms       10.66 ms
+jsone                            161.45        6.19 ms    ±54.22%        7.61 ms       13.84 ms
+Tiny                             125.16        7.99 ms    ±39.98%        9.51 ms       12.67 ms
+JSX                               69.87       14.31 ms    ±26.83%       13.24 ms       26.74 ms
+JSON (w/o unicode escape)         62.60       15.97 ms    ±24.85%       15.47 ms       28.53 ms
+
+Comparison:
+jiffy                            776.67
+Jason                            209.51 - 3.71x slower +3.49 ms
+Poison                           190.93 - 4.07x slower +3.95 ms
+jsone                            161.45 - 4.81x slower +4.91 ms
+Tiny                             125.16 - 6.21x slower +6.70 ms
+JSX                               69.87 - 11.12x slower +13.02 ms
+JSON (w/o unicode escape)         62.60 - 12.41x slower +14.69 ms
+
+##### With input UTF-8 unescaped #####
+Name                                ips        average  deviation         median         99th %
+jiffy                           6644.53       0.150 ms    ±71.33%       0.111 ms        0.52 ms
+JSON (w/o unicode escape)       1167.89        0.86 ms   ±197.53%        0.33 ms        7.07 ms
+Jason                            626.25        1.60 ms   ±126.38%        0.79 ms        7.84 ms
+jsone                            582.41        1.72 ms   ±120.31%        0.87 ms        8.40 ms
+Poison                           401.44        2.49 ms   ±101.83%        1.05 ms        9.21 ms
+JSX                              273.48        3.66 ms    ±72.06%        1.66 ms        8.39 ms
+Tiny                             220.14        4.54 ms    ±73.89%        2.99 ms       10.39 ms
+
+Comparison:
+jiffy                           6644.53
+JSON (w/o unicode escape)       1167.89 - 5.69x slower +0.71 ms
+Jason                            626.25 - 10.61x slower +1.45 ms
+jsone                            582.41 - 11.41x slower +1.57 ms
+Poison                           401.44 - 16.55x slower +2.34 ms
+JSX                              273.48 - 24.30x slower +3.51 ms
+Tiny                             220.14 - 30.18x slower +4.39 ms
+
+
+##
+## Decoding
+##
+Operating System: Linux
+CPU Information: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
+Number of Available Cores: 12
+Available memory: 24.68 GB
+Elixir 1.7.4
+Erlang 24.0.2
+
+Benchmark suite executing with the following configuration:
+warmup: 2 s
+time: 5 s
+memory time: 0 ns
+parallel: 4
+inputs: Blockchain, Giphy, GitHub, GovTrack, Issue 90, JSON Generator, JSON Generator (Pretty), Pokedex, UTF-8 escaped, UTF-8 unescaped
+Estimated total run time: 8.17 min
+
+##### With input Blockchain #####
+Name             ips        average  deviation         median         99th %
+Jason         2.75 K      364.27 μs    ±42.74%      318.40 μs      824.75 μs
+jiffy         2.62 K      380.96 μs    ±26.26%      334.30 μs      697.00 μs
+jsone         2.21 K      452.58 μs    ±33.19%      401.70 μs      916.63 μs
+Tiny          1.49 K      672.69 μs    ±25.01%      622.10 μs     1144.22 μs
+Poison        1.32 K      759.77 μs    ±36.93%         682 μs     1385.84 μs
+JSX           0.89 K     1129.63 μs    ±22.84%     1093.05 μs     1827.75 μs
+JSON          0.35 K     2853.02 μs    ±20.10%     2656.30 μs     4258.25 μs
+
+Comparison:
+Jason         2.75 K
+jiffy         2.62 K - 1.05x slower +16.69 μs
+jsone         2.21 K - 1.24x slower +88.31 μs
+Tiny          1.49 K - 1.85x slower +308.42 μs
+Poison        1.32 K - 2.09x slower +395.51 μs
+JSX           0.89 K - 3.10x slower +765.36 μs
+JSON          0.35 K - 7.83x slower +2488.75 μs
+
+##### With input Giphy #####
+Name             ips        average  deviation         median         99th %
+jiffy         243.45        4.11 ms    ±24.50%        3.79 ms        7.30 ms
+Jason         212.18        4.71 ms    ±12.22%        4.65 ms        6.38 ms
+Tiny          114.54        8.73 ms    ±18.56%        8.49 ms       14.61 ms
+Poison        110.76        9.03 ms    ±14.05%        8.77 ms       13.39 ms
+jsone         109.11        9.17 ms    ±10.48%        8.99 ms       12.37 ms
+JSX            64.32       15.55 ms    ±11.93%       15.05 ms       21.78 ms
+JSON           35.67       28.03 ms    ±16.36%       27.43 ms       42.75 ms
+
+Comparison:
+jiffy         243.45
+Jason         212.18 - 1.15x slower +0.61 ms
+Tiny          114.54 - 2.13x slower +4.62 ms
+Poison        110.76 - 2.20x slower +4.92 ms
+jsone         109.11 - 2.23x slower +5.06 ms
+JSX            64.32 - 3.78x slower +11.44 ms
+JSON           35.67 - 6.82x slower +23.92 ms
+
+##### With input GitHub #####
+Name             ips        average  deviation         median         99th %
+jiffy        1052.94        0.95 ms    ±22.77%        0.93 ms        1.61 ms
+Jason         973.41        1.03 ms    ±25.72%        0.91 ms        1.63 ms
+jsone         662.39        1.51 ms    ±29.01%        1.33 ms        2.44 ms
+Tiny          542.67        1.84 ms    ±24.63%        1.65 ms        2.97 ms
+Poison        438.79        2.28 ms    ±27.41%        2.00 ms        3.77 ms
+JSX           271.97        3.68 ms    ±25.09%        3.37 ms        6.39 ms
+JSON          137.02        7.30 ms    ±24.43%        6.51 ms       14.15 ms
+
+Comparison:
+jiffy        1052.94
+Jason         973.41 - 1.08x slower +0.0776 ms
+jsone         662.39 - 1.59x slower +0.56 ms
+Tiny          542.67 - 1.94x slower +0.89 ms
+Poison        438.79 - 2.40x slower +1.33 ms
+JSX           271.97 - 3.87x slower +2.73 ms
+JSON          137.02 - 7.68x slower +6.35 ms
+
+##### With input GovTrack #####
+Name             ips        average  deviation         median         99th %
+Jason          10.77       92.89 ms     ±3.60%       92.38 ms      104.04 ms
+jiffy           8.32      120.21 ms    ±13.66%      116.74 ms      209.22 ms
+jsone           5.08      196.89 ms     ±2.84%      196.93 ms      213.51 ms
+Tiny            3.65      273.94 ms     ±9.00%      266.38 ms      355.47 ms
+Poison          3.58      279.42 ms     ±5.59%      275.79 ms      328.55 ms
+JSX             2.81      356.16 ms     ±8.26%      348.67 ms      462.50 ms
+JSON            0.80     1246.50 ms     ±8.67%     1200.07 ms     1461.19 ms
+
+Comparison:
+Jason          10.77
+jiffy           8.32 - 1.29x slower +27.31 ms
+jsone           5.08 - 2.12x slower +103.99 ms
+Tiny            3.65 - 2.95x slower +181.04 ms
+Poison          3.58 - 3.01x slower +186.53 ms
+JSX             2.81 - 3.83x slower +263.27 ms
+JSON            0.80 - 13.42x slower +1153.61 ms
+
+##### With input Issue 90 #####
+Name             ips        average  deviation         median         99th %
+jiffy          41.16       24.30 ms    ±24.21%       21.18 ms       39.99 ms
+Jason          17.85       56.03 ms    ±18.81%       52.29 ms      115.16 ms
+Tiny           14.03       71.30 ms     ±7.87%       69.13 ms       91.71 ms
+Poison         13.63       73.38 ms    ±16.26%       69.75 ms      110.67 ms
+jsone          10.79       92.71 ms    ±16.86%       87.96 ms      176.42 ms
+JSX             6.02      166.15 ms     ±4.41%      166.21 ms      188.03 ms
+JSON            0.88     1132.61 ms    ±11.59%     1162.26 ms     1283.75 ms
+
+Comparison:
+jiffy          41.16
+Jason          17.85 - 2.31x slower +31.73 ms
+Tiny           14.03 - 2.93x slower +47.00 ms
+Poison         13.63 - 3.02x slower +49.08 ms
+jsone          10.79 - 3.82x slower +68.41 ms
+JSX             6.02 - 6.84x slower +141.85 ms
+JSON            0.88 - 46.61x slower +1108.31 ms
+
+##### With input JSON Generator #####
+Name             ips        average  deviation         median         99th %
+Jason         320.79        3.12 ms    ±18.37%        3.01 ms        4.84 ms
+jiffy         243.93        4.10 ms    ±32.94%        4.04 ms        8.01 ms
+jsone         184.23        5.43 ms    ±12.12%        5.29 ms        7.40 ms
+Tiny          139.78        7.15 ms    ±23.25%        6.53 ms       12.31 ms
+Poison        135.47        7.38 ms    ±24.91%        6.74 ms       12.84 ms
+JSX           111.24        8.99 ms    ±17.87%        8.30 ms       12.68 ms
+JSON           25.16       39.75 ms    ±14.21%       38.92 ms       70.68 ms
+
+Comparison:
+Jason         320.79
+jiffy         243.93 - 1.32x slower +0.98 ms
+jsone         184.23 - 1.74x slower +2.31 ms
+Tiny          139.78 - 2.29x slower +4.04 ms
+Poison        135.47 - 2.37x slower +4.26 ms
+JSX           111.24 - 2.88x slower +5.87 ms
+JSON           25.16 - 12.75x slower +36.63 ms
+
+##### With input JSON Generator (Pretty) #####
+Name             ips        average  deviation         median         99th %
+Jason         273.57        3.66 ms    ±22.33%        3.48 ms        6.78 ms
+jiffy         205.09        4.88 ms    ±24.77%        4.60 ms        8.14 ms
+jsone         158.82        6.30 ms    ±19.76%        5.99 ms       11.16 ms
+Tiny          136.65        7.32 ms    ±20.28%        6.77 ms       10.96 ms
+Poison        123.31        8.11 ms    ±25.48%        7.26 ms       14.10 ms
+JSX            97.93       10.21 ms    ±19.97%        9.45 ms       17.34 ms
+JSON           25.04       39.94 ms     ±7.43%       39.61 ms       49.30 ms
+
+Comparison:
+Jason         273.57
+jiffy         205.09 - 1.33x slower +1.22 ms
+jsone         158.82 - 1.72x slower +2.64 ms
+Tiny          136.65 - 2.00x slower +3.66 ms
+Poison        123.31 - 2.22x slower +4.45 ms
+JSX            97.93 - 2.79x slower +6.56 ms
+JSON           25.04 - 10.93x slower +36.28 ms
+
+##### With input Pokedex #####
+Name             ips        average  deviation         median         99th %
+Jason         527.63        1.90 ms    ±14.20%        1.84 ms        2.81 ms
+jiffy         285.43        3.50 ms    ±28.47%        3.33 ms        5.95 ms
+jsone         245.36        4.08 ms    ±15.65%        3.97 ms        6.13 ms
+Poison        172.45        5.80 ms    ±21.78%        5.28 ms        8.66 ms
+Tiny          152.59        6.55 ms    ±23.87%        5.94 ms       11.96 ms
+JSX           140.90        7.10 ms    ±17.08%        6.63 ms       10.11 ms
+JSON           33.70       29.67 ms    ±19.74%       28.52 ms       64.83 ms
+
+Comparison:
+Jason         527.63
+jiffy         285.43 - 1.85x slower +1.61 ms
+jsone         245.36 - 2.15x slower +2.18 ms
+Poison        172.45 - 3.06x slower +3.90 ms
+Tiny          152.59 - 3.46x slower +4.66 ms
+JSX           140.90 - 3.74x slower +5.20 ms
+JSON           33.70 - 15.66x slower +27.78 ms
+
+##### With input UTF-8 escaped #####
+Name             ips        average  deviation         median         99th %
+jiffy        7923.08       0.126 ms    ±60.63%       0.106 ms        0.23 ms
+Jason        1224.48        0.82 ms    ±35.91%        0.78 ms        1.65 ms
+Poison        918.21        1.09 ms    ±31.37%        0.93 ms        2.34 ms
+jsone         573.70        1.74 ms    ±29.56%        1.58 ms        3.20 ms
+JSX           550.36        1.82 ms    ±26.99%        1.66 ms        3.62 ms
+Tiny          520.31        1.92 ms    ±28.48%        1.75 ms        3.73 ms
+JSON          326.43        3.06 ms    ±16.08%        3.00 ms        4.47 ms
+
+Comparison:
+jiffy        7923.08
+Jason        1224.48 - 6.47x slower +0.69 ms
+Poison        918.21 - 8.63x slower +0.96 ms
+jsone         573.70 - 13.81x slower +1.62 ms
+JSX           550.36 - 14.40x slower +1.69 ms
+Tiny          520.31 - 15.23x slower +1.80 ms
+JSON          326.43 - 24.27x slower +2.94 ms
+
+##### With input UTF-8 unescaped #####
+Name             ips        average  deviation         median         99th %
+jiffy        12.54 K       79.75 μs    ±93.83%       67.80 μs      147.80 μs
+Jason         5.56 K      179.73 μs    ±26.63%      159.30 μs      369.25 μs
+jsone         5.09 K      196.57 μs    ±34.98%      167.20 μs         406 μs
+Poison        4.39 K      227.69 μs    ±40.06%      194.20 μs      432.10 μs
+JSX           3.30 K      303.42 μs    ±39.01%      284.30 μs      522.46 μs
+Tiny          1.46 K      686.25 μs    ±30.36%      639.30 μs     1144.77 μs
+JSON          1.35 K      739.34 μs    ±64.82%      561.25 μs     2226.09 μs
+
+Comparison:
+jiffy        12.54 K
+Jason         5.56 K - 2.25x slower +99.98 μs
+jsone         5.09 K - 2.46x slower +116.82 μs
+Poison        4.39 K - 2.85x slower +147.94 μs
+JSX           3.30 K - 3.80x slower +223.67 μs
+Tiny          1.46 K - 8.60x slower +606.50 μs
+JSON          1.35 K - 9.27x slower +659.59 μs
+```

+ 131 - 0
benchmark/poison.patch

@@ -0,0 +1,131 @@
+diff --git a/bench/run.exs b/bench/run.exs
+index 5e61983..1f54339 100644
+--- a/bench/run.exs
++++ b/bench/run.exs
+@@ -1,11 +1,11 @@
+ encode_jobs = %{
+-  "Poison" => &Poison.encode!/1,
+-  "Jason" => &Jason.encode!/1,
+-  "JSX" => &JSX.encode!/1,
++  "Poison" => &Poison.encode!(&1, escape: :unicode),
++  "Jason" => &Jason.encode!(&1, escape: :unicode_safe),
++  "JSX" => &JSX.encode!(&1, [:uescape]),
+   "Tiny" => &Tiny.encode!/1,
+   "jsone" => &:jsone.encode/1,
+-  "jiffy" => &:jiffy.encode/1,
+-  "JSON" => &JSON.encode!/1
++  "jiffy" => &:jiffy.encode(&1, [:uescape]),
++  "JSON (w/o unicode escape)" => &JSON.encode!/1
+ }
+ 
+ encode_inputs = [
+@@ -64,13 +64,7 @@ Benchee.run(encode_jobs,
+       |> (&{name, &1}).()
+     end,
+   formatters: [
+-    &Benchee.Formatters.HTML.output/1,
+-    &Benchee.Formatters.Console.output/1
+-  ],
+-  formatter_options: [
+-    html: [
+-      file: Path.expand("output/encode.html", __DIR__)
+-    ]
++    Benchee.Formatters.Console
+   ]
+ )
+ 
+@@ -85,12 +79,6 @@ Benchee.run(decode_jobs,
+       |> (&{name, &1}).()
+     end,
+   formatters: [
+-    &Benchee.Formatters.HTML.output/1,
+-    &Benchee.Formatters.Console.output/1
+-  ],
+-  formatter_options: [
+-    html: [
+-      file: Path.expand("output/decode.html", __DIR__)
+-    ]
++    Benchee.Formatters.Console
+   ]
+ )
+diff --git a/mix.exs b/mix.exs
+index c07cf0d..8426e22 100644
+--- a/mix.exs
++++ b/mix.exs
+@@ -54,15 +54,13 @@ defmodule Poison.Mixfile do
+       {:dialyxir, "~> 0.5", only: :dev, runtime: false},
+       {:ex_doc, "~> 0.19", only: :dev, runtime: false},
+       {:excoveralls, "~> 0.9", only: :test},
+-      {:benchee, "~> 0.13", only: :bench},
+-      {:benchee_json, "~> 0.5", only: :bench},
+-      {:benchee_html, "~> 0.5", only: :bench},
++      {:benchee, "~> 1.0", only: :bench},
+       {:jason, "~> 1.1", only: [:test, :bench]},
+       {:exjsx, "~> 4.0", only: :bench},
+       {:tiny, "~> 1.0", only: :bench},
+       {:jsone, "~> 1.4", only: :bench},
+-      {:jiffy, "~> 0.15", only: :bench},
+-      {:json, "~> 1.2", only: :bench}
++      {:jiffy, "~> 1.0", only: :bench},
++      {:json, "~> 1.4", only: :bench}
+     ]
+   end
+ 
+diff --git a/mix.lock b/mix.lock
+index 1151d4d..ff9b1bd 100644
+--- a/mix.lock
++++ b/mix.lock
+@@ -1,28 +1,27 @@
+ %{
+-  "benchee": {:hex, :benchee, "0.13.1", "bd93ca05be78bcb6159c7176230efeda2f724f7ffd485515175ca411dff4893e", [:mix], [{:deep_merge, "~> 0.1", [hex: :deep_merge, repo: "hexpm", optional: false]}], "hexpm"},
+-  "benchee_html": {:hex, :benchee_html, "0.5.0", "1354ba8005f979c177561fe08b83cafbae43f3046e8a6cf209132b8967b6db17", [:mix], [{:benchee, "~> 0.12", [hex: :benchee, repo: "hexpm", optional: false]}, {:benchee_json, "~> 0.5", [hex: :benchee_json, repo: "hexpm", optional: false]}], "hexpm"},
+-  "benchee_json": {:hex, :benchee_json, "0.5.0", "75878fd9944093ced03e9c214e6e1429da147de43e2f4a4cbc4377294ed5d029", [:mix], [{:benchee, "~> 0.12", [hex: :benchee, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"},
+-  "certifi": {:hex, :certifi, "2.3.1", "d0f424232390bf47d82da8478022301c561cf6445b5b5fb6a84d49a9e76d2639", [:rebar3], [{:parse_trans, "3.2.0", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm"},
+-  "deep_merge": {:hex, :deep_merge, "0.1.1", "c27866a7524a337b6a039eeb8dd4f17d458fd40fbbcb8c54661b71a22fffe846", [:mix], [], "hexpm"},
+-  "dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], [], "hexpm"},
+-  "earmark": {:hex, :earmark, "1.2.5", "4d21980d5d2862a2e13ec3c49ad9ad783ffc7ca5769cf6ff891a4553fbaae761", [:mix], [], "hexpm"},
+-  "ex_doc": {:hex, :ex_doc, "0.19.0", "e22b6434373b4870ea77b24df069dbac7002c1f483615e9ebfc0c37497e1c75c", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.7", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
+-  "excoveralls": {:hex, :excoveralls, "0.9.1", "14fd20fac51ab98d8e79615814cc9811888d2d7b28e85aa90ff2e30dcf3191d6", [:mix], [{:hackney, ">= 0.12.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"},
+-  "exjsx": {:hex, :exjsx, "4.0.0", "60548841e0212df401e38e63c0078ec57b33e7ea49b032c796ccad8cde794b5c", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm"},
+-  "hackney": {:hex, :hackney, "1.13.0", "24edc8cd2b28e1c652593833862435c80661834f6c9344e84b6a2255e7aeef03", [:rebar3], [{:certifi, "2.3.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.2", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"},
+-  "idna": {:hex, :idna, "5.1.2", "e21cb58a09f0228a9e0b95eaa1217f1bcfc31a1aaa6e1fdf2f53a33f7dbd9494", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"},
+-  "jason": {:hex, :jason, "1.1.1", "d3ccb840dfb06f2f90a6d335b536dd074db748b3e7f5b11ab61d239506585eb2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
+-  "jiffy": {:hex, :jiffy, "0.15.2", "de266c390111fd4ea28b9302f0bc3d7472468f3b8e0aceabfbefa26d08cd73b7", [:rebar3], [], "hexpm"},
+-  "json": {:hex, :json, "1.2.5", "3682c18c6b07480df2122d0daf5c05457b42c1990f197ce3de53884e8ba834c4", [:mix], [{:benchee, "~> 0.8", [hex: :benchee, repo: "hexpm", optional: true]}, {:benchee_html, "~> 0.1", [hex: :benchee_html, repo: "hexpm", optional: true]}, {:exjsx, "~> 4.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:jsone, "~> 1.4", [hex: :jsone, repo: "hexpm", optional: true]}, {:poison, "~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:tiny, "~> 1.0", [hex: :tiny, repo: "hexpm", optional: true]}], "hexpm"},
+-  "jsone": {:hex, :jsone, "1.4.7", "a970c23d9700ae7842b526c57677e6e3f10894b429524696ead547e9302391c0", [:rebar3], [], "hexpm"},
+-  "jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], [], "hexpm"},
+-  "makeup": {:hex, :makeup, "0.5.1", "966c5c2296da272d42f1de178c1d135e432662eca795d6dc12e5e8787514edf7", [:mix], [{:nimble_parsec, "~> 0.2.2", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
+-  "makeup_elixir": {:hex, :makeup_elixir, "0.8.0", "1204a2f5b4f181775a0e456154830524cf2207cf4f9112215c05e0b76e4eca8b", [:mix], [{:makeup, "~> 0.5.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 0.2.2", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
+-  "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm"},
+-  "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"},
+-  "nimble_parsec": {:hex, :nimble_parsec, "0.2.2", "d526b23bdceb04c7ad15b33c57c4526bf5f50aaa70c7c141b4b4624555c68259", [:mix], [], "hexpm"},
+-  "parse_trans": {:hex, :parse_trans, "3.2.0", "2adfa4daf80c14dc36f522cf190eb5c4ee3e28008fc6394397c16f62a26258c2", [:rebar3], [], "hexpm"},
+-  "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], [], "hexpm"},
+-  "tiny": {:hex, :tiny, "1.0.1", "535ea7e600cb1c6ba17b53029266d9d7ec54ce29bfb05d906c433907acfa01ca", [:mix], [], "hexpm"},
+-  "unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [:rebar3], [], "hexpm"},
++  "benchee": {:hex, :benchee, "1.0.1", "66b211f9bfd84bd97e6d1beaddf8fc2312aaabe192f776e8931cb0c16f53a521", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}], "hexpm", "3ad58ae787e9c7c94dd7ceda3b587ec2c64604563e049b2a0e8baafae832addb"},
++  "certifi": {:hex, :certifi, "2.6.1", "dbab8e5e155a0763eea978c913ca280a6b544bfa115633fa20249c3d396d9493", [:rebar3], [], "hexpm", "524c97b4991b3849dd5c17a631223896272c6b0af446778ba4675a1dff53bb7e"},
++  "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
++  "dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], [], "hexpm", "6c32a70ed5d452c6650916555b1f96c79af5fc4bf286997f8b15f213de786f73"},
++  "earmark_parser": {:hex, :earmark_parser, "1.4.13", "0c98163e7d04a15feb62000e1a891489feb29f3d10cb57d4f845c405852bbef8", [:mix], [], "hexpm", "d602c26af3a0af43d2f2645613f65841657ad6efc9f0e361c3b6c06b578214ba"},
++  "ex_doc": {:hex, :ex_doc, "0.24.2", "e4c26603830c1a2286dae45f4412a4d1980e1e89dc779fcd0181ed1d5a05c8d9", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "e134e1d9e821b8d9e4244687fb2ace58d479b67b282de5158333b0d57c6fb7da"},
++  "excoveralls": {:hex, :excoveralls, "0.14.1", "14140e4ef343f2af2de33d35268c77bc7983d7824cb945e6c2af54235bc2e61f", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "4a588f9f8cf9dc140cc1f3d0ea4d849b2f76d5d8bee66b73c304bb3d3689c8b0"},
++  "exjsx": {:hex, :exjsx, "4.0.0", "60548841e0212df401e38e63c0078ec57b33e7ea49b032c796ccad8cde794b5c", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm", "32e95820a97cffea67830e91514a2ad53b888850442d6d395f53a1ac60c82e07"},
++  "hackney": {:hex, :hackney, "1.17.4", "99da4674592504d3fb0cfef0db84c3ba02b4508bae2dff8c0108baa0d6e0977c", [:rebar3], [{:certifi, "~>2.6.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "de16ff4996556c8548d512f4dbe22dd58a587bf3332e7fd362430a7ef3986b16"},
++  "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
++  "jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
++  "jiffy": {:hex, :jiffy, "1.0.8", "60e36f00be35e5ac6e6cf2d4caf3bdf3103d4460aff385f543a8d7df2d6d9613", [:rebar3], [], "hexpm", "f9ae986ba5a0854eb48cf6a76192d9367086da86c20197da430630be7c087a4e"},
++  "json": {:hex, :json, "1.4.1", "8648f04a9439765ad449bc56a3ff7d8b11dd44ff08ffcdefc4329f7c93843dfa", [:mix], [], "hexpm", "9abf218dbe4ea4fcb875e087d5f904ef263d012ee5ed21d46e9dbca63f053d16"},
++  "jsone": {:hex, :jsone, "1.6.0", "4ed7e456cff24ff153c2eac7e1855797ea1b1416ef0bbc368525ed8cbeb57518", [:rebar3], [], "hexpm", "9e5623ac927a278086a3e758537c68f312f6b16a2d0582a0d1c8a58bd4a939db"},
++  "jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], [], "hexpm", "fc3499fed7a726995aa659143a248534adc754ebd16ccd437cd93b649a95091f"},
++  "makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
++  "makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},
++  "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
++  "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
++  "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},
++  "nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
++  "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
++  "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
++  "tiny": {:hex, :tiny, "1.0.1", "535ea7e600cb1c6ba17b53029266d9d7ec54ce29bfb05d906c433907acfa01ca", [:mix], [], "hexpm", "1278a457deb8d99135c378b71f66f21e283d8adea426252a3f8f5e003c536a7b"},
++  "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
+ }

+ 9 - 0
benchmark/run.sh

@@ -0,0 +1,9 @@
+#! /bin/bash
+
+set -eux
+
+git clone https://github.com/devinus/poison && cd poison
+git checkout 4.0.1
+patch -p1 < ../poison.patch
+mix deps.get
+MIX_ENV=bench mix run bench/run.exs