JSON benchmarks
Mix.install([
{:jason, "~> 1.4"},
{:benchee, "~> 1.3"},
{:kino_benchee, "~> 0.1.0"},
{:jiffy_ex, "~> 1.1"},
{:poison, "~> 5.0"}
])
Section
json = File.read!("/Users/ezcurdia/code/fixle.json")
Benchee.run(
%{
"poison" => fn -> Jason.decode!(json) end,
"jason" => fn -> Poison.decode!(json) end,
"jiffy" => fn -> JiffyEx.decode!(json) end
},
memory_time: 5,
reduction_time: 5
)