pysimdjson
pysimdjson copied to clipboard
Performance penalty when reading items
I'm getting increased latency in my application from simdjson but I can't figure out why.
This is a snippet from profiling the function that gets items from the simdjson object. The time is in seconds.
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
26 0.017 0.001 0.017 0.001 {method 'get' of 'csimdjson.Object' objects}
When I time getting individual items from the same object I get timings of about 15 microseconds which seems comparable with getting items from a normal python dictionary. However when I test the whole function the performance is much worse.
Can you show your code, ideally with a minimum reproduction? The timing alone is not enough to work off of.
Closing due to lack of reproducible example.