|
|
|
|
|
by jkire
4089 days ago
|
|
> We have a dictionary with 3 keys  What about larger dictionaries? With such a small one I would be worried that a significant proportion of the time would be simple overhead. [Warning: Anecdote] When we were testing out the various JSON libraries we found simplejson much faster than json for dumps. We used large dictionaries. Was the simplejson package using its optimized C library? |
|
I completely failed to read this the first time I went through. I guess this is equivalent to dumping bigger dictionaries.
> [Warning: Anecdote] When we were testing out the various JSON libraries we found simplejson much faster than json for dumps.
Turns out we were using sort_keys=True option, which apparently makes simplejson much faster than json.