Comment on Speed tests for *json and cPickle in PythonparentComments−trafficlight15yWhat does the "-1" dump argument mean in 3rd example?−thezilch15yThe equivalent of using pickle.HIGHEST_PROTOCOL or pickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL) -- any negative value will force highest protocol.−kingkilr15yIt says to use the highest optimization level.−d0mine15yNo. It says use the highest available protocol.The highest available protocol is not necessarily the fastest. There might be other than pure speed reasons to introduce the next Pickle protocol.
Comments
What does the "-1" dump argument mean in 3rd example?
The equivalent of using pickle.HIGHEST_PROTOCOL or pickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL) -- any negative value will force highest protocol.
It says to use the highest optimization level.
No. It says use the highest available protocol.
The highest available protocol is not necessarily the fastest. There might be other than pure speed reasons to introduce the next Pickle protocol.