Uses write batching, which is what most threaded applications should do to avoid GIL contention. Otherwise, you'll be looping repeatedly, trying to acquire GIL for each (key, value) pair.
Ensures writes are sync so the benchmark doesn't test system buffer cache state.
Uses perf_counter() in Python for more accurate timing
Makes the operation sizes slightly larger
Adds nice things like type annotations and black formatting :)
This does a couple of things:
(key, value)
pair.perf_counter()
in Python for more accurate timingblack
formatting :)