interesting, thanks for these numbers!
So far the JsonSimpleParser example from parboiled2 is nothing more than a toy example for testing our new parsing infrastructure.
Neither the parsing infrastructure nor the JSON parser have yet been optimized.
Insofar it's great to see that the basic approach is indeed delivering the performance we've been targeting.
even though pb2-M2 is quite a bit faster than pb2-M1 it is extremely hard to have its JSON parser example perform similarly to Jackson.
Jackson is very carefully handcrafted for max performance and is generally about twice as fast as other hand-written parsers.
I don’t believe that *any* parser generator will be able to produce code that is as efficient as Jackson’s.
However, pb2 is not a JSON parser, it’s a tool for easily building parsers.
As such it has to perform well in order to be applicable to a wide range to use cases.
We believe that even in its current state it easily meets that requirement.
Here is how pb2’s JSON parser example performs on my MBP:
So Jackson is still about 3 times as fast as the pb2-based JSON parser.
However, we are certainly not done optimising pb2 yet, so we should be able to get a little closer (without requiring you to change your pb2-based code).