I got curious about the impressive speeds of pom's json example so I decided to measure it compared to my own json example. SinceRather surprisingly pom was several times faster than my own parser which is entirely statically dispatched. However when I looked through the benchmark source I realized that the benchmark forgets to reset the input before each iteration which meant that the parser only parsed the file on the first iteration, all other iterations only parsed an empty string.
let mut input = DataInput::new(&data);
b.iter(|| json::json().parse(&mut input).ok());
vs
b.iter(|| {
let mut input = DataInput::new(&data);
json::json().parse(&mut input).ok()
});
I see you have removed the benchmarks now so I am unsure what you want to do but you should probably at least update the performance numbers in the readme.
I got curious about the impressive speeds of pom's json example so I decided to measure it compared to my own json example. SinceRather surprisingly pom was several times faster than my own parser which is entirely statically dispatched. However when I looked through the benchmark source I realized that the benchmark forgets to reset the input before each iteration which meant that the parser only parsed the file on the first iteration, all other iterations only parsed an empty string.
vs
I see you have removed the benchmarks now so I am unsure what you want to do but you should probably at least update the performance numbers in the readme.