[FEATURE] Speeding up JSON and pickle: to_dict() method #76
Labels
Effort: Medium
How to waste a beautiful weekend
Needs: Doc
Improvements or additions to documentation
Needs: Test
Hey, it compiles! Ship it!
Priority: High
A blocking bug or an important feature
Type: Enhancement
New feature or request
Currently, if you want to serialize a
frozendict
to JSON, you have to convert it todict
, even iffrozendict
is aMapping
. This is a limitation ofjson
builtin and third party modules.To mitigate speed problems, a
to_dict()
method can be added. It will return a memcopy offrozendict
into a newdict
object. It should be much faster thandict(a_frozendict)
.This new method should also speed up
pickle.dumps()
. Sincefrozendict
can be really useful in multiprocessing, this could be a nice bonus.The text was updated successfully, but these errors were encountered: