Open staabm opened 3 years ago
I feel we could get the most out of persica (in the json bench), if we could either reduce take1
to an absolute minimum regarding overhead, or alternatively try to achieve parsing by doing multiple chars at a time instead of 1 by 1 (not sure this is possible).
my assumptions stem just from profilling source code. take it with a grain of salt, as I have zero experience building parsers and haven't used parsica at all yet.
while doing further performance investigation I came to the conclusion that parsica is "slow" on JSONBench, because
this PR reduces the number of methods beeing called per character in the most basic building blocks. take it as a PoC to show where we loose performance because of design decisions
before
after
blackfire reports a ~10% perf boost