pysimdjson icon indicating copy to clipboard operation
pysimdjson copied to clipboard

Performance penalty when reading items

Open jonathan-kosgei opened this issue 3 years ago • 1 comments

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.

jonathan-kosgei avatar Aug 14 '22 21:08 jonathan-kosgei

Can you show your code, ideally with a minimum reproduction? The timing alone is not enough to work off of.

TkTech avatar Sep 12 '22 23:09 TkTech

Closing due to lack of reproducible example.

TkTech avatar Sep 03 '23 02:09 TkTech