Closed stokito closed 1 year ago
@stokito The iterators and stuff seems to be stack allocated, so they are cheap.
The only impactful improvement would be to avoid all the strings, since they will of course need allocs, but that would be a quality of life reduction.
Here is an example extracted from a real highly loaded OpenRTB parser. It's a good sample how to work with inline structures and arrays.
I'm not sure that this is the most efficient way of use so please tell me if something can be optimized. For example reuse of the ParsedJson on the benchmark increases usage of memory. I don't know how this can be explained. Maybe you have a guess why.