Message204480
> If it's an optimizatio, can I see some benchmarks numbers? :-)
First create two files. Run unpatched Python:
./python -c "import pickle, lzma; data = [bytes([i])*2**16 for i in
range(256)]; with open('test.pickle4', 'wb'): pickle.dump(data, f, 4)"
Then run the same with patched Python for 'test.pickle4opt'.
Now benchmark loading.
$ ./python -m timeit "import pickle;" "with open('test.pickle4', 'rb',
buffering=0) as f: pickle.load(f)"
10 loops, best of 3: 52.9 msec per loop
$ ./python -m timeit "import pickle;" "with open('test.pickle4opt', 'rb',
buffering=0) as f: pickle.load(f)"
10 loops, best of 3: 48.9 msec per loop
The difference is about 5%. On faster computers with slower files (sockets?) it
should be larger. |
|
Date |
User |
Action |
Args |
2013-11-26 14:55:48 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, vstinner, larry, alexandre.vassalotti, Arfrever |
2013-11-26 14:55:48 | serhiy.storchaka | link | issue19780 messages |
2013-11-26 14:55:47 | serhiy.storchaka | create | |
|