|
|
|
|
|
by rurban
2274 days ago
|
|
That's of course true. Branching is costly and malloc is costly.
But there is a need to filter objects and arrays in the 2nd part behind the parsing, in the conversion to your language/data. With a slower seperate function of course. Parsing is the neglible fast part, converting it into your business objects is the slow part. This is usually done with the 2nd tape step. This involves a lot of malloc's, and you really want to skip the unneeded parts and filter it upfront. Still thinking how to design my new JSON parser around simdjson. |
|