[mnet-devel] better dumper benchmarks, with comments
Zooko
zooko at zooko.com
Fri Aug 8 12:30:24 BST 2003
Interestingly, pickle and banana (the Twisted encoder) go slower on bigger
dicts, where mencoder and myownspecialdumper go the same speed regardless of
the size of the dict.
Surprisingly to me, the "spool straight to file" variants are *slower* than
the "build in memory then dump to file" variants. Hm -- this may be due to my
tmpfs filesystem. I ran the experiment again, with fewer iterations, on my
reiserfs3 filesystem, and while pickletofile became faster than pickle,
mencodetofile remained slower than mencode. (Output of that run is
appended.) It's a mystery to me.
Here are the resulting files:
-rw-rw-r-- 1 zooko zooko 28250310 Aug 7 22:46 /tmp/bench.pickletofile
-rw-rw-r-- 1 zooko zooko 28250310 Aug 7 23:35 /tmp/bench.pickle
-rw-rw-r-- 1 zooko zooko 19860426 Aug 8 00:28 /tmp/bench.banana
-rw-rw-r-- 1 zooko zooko 38734786 Aug 8 02:05 /tmp/bench.mencode
-rw-rw-r-- 1 zooko zooko 10485760 Aug 8 02:54 /tmp/bench.mosd
--Z
------- run with large numbers of iterations on tmpfs filesystem
MAIN pion:~$ time /usr/local/stow/python2.3-O2-athlon-xp/bin/python -OO ~/playground/mnet/mnet_new/mnetlib/scripts/benchpickle.py
NOTE: c_mencode found, using accelerated C version of mencode
pickletofile
N: 16384, time: ave: 0.23, 6th-best: 0.21, 6th-worst: 0.29 (of 256), ave rate: 69842
N: 65536, time: ave: 1.21, 6th-best: 1.10, 6th-worst: 1.39 (of 256), ave rate: 53953
N: 262144, time: ave: 8.53, 5th-best: 7.94, 5th-worst: 9.14 (of 115), ave rate: 30725
N: 1048576, time: ave: 92.31, 3th-best: 91.48, 3th-worst: 96.73 (of 12), ave rate: 11359
pickle
N: 16384, time: ave: 0.24, 6th-best: 0.21, 6th-worst: 0.32 (of 256), ave rate: 67940
N: 65536, time: ave: 1.27, 6th-best: 1.12, 6th-worst: 1.47 (of 256), ave rate: 51696
N: 262144, time: ave: 8.95, 5th-best: 8.26, 5th-worst: 9.62 (of 110), ave rate: 29295
N: 1048576, time: ave: 93.13, 3th-best: 91.00, 3th-worst: 94.88 (of 12), ave rate: 11259
banana
N: 16384, time: ave: 0.42, 6th-best: 0.40, 6th-worst: 0.46 (of 256), ave rate: 38991
N: 65536, time: ave: 1.82, 6th-best: 1.72, 6th-worst: 1.95 (of 256), ave rate: 35912
N: 262144, time: ave: 9.27, 5th-best: 8.80, 5th-worst: 9.59 (of 107), ave rate: 28280
N: 1048576, time: ave: 67.91, 3th-best: 66.89, 3th-worst: 69.43 (of 16), ave rate: 15442
mencode
N: 16384, time: ave: 0.23, 6th-best: 0.23, 6th-worst: 0.25 (of 256), ave rate: 70932
N: 65536, time: ave: 0.95, 6th-best: 0.93, 6th-worst: 0.97 (of 256), ave rate: 68868
N: 262144, time: ave: 3.91, 6th-best: 3.87, 6th-worst: 3.95 (of 202), ave rate: 67081
N: 1048576, time: ave: 16.04, 4th-best: 15.96, 4th-worst: 16.09 (of 50), ave rate: 65383
mencode_to_file
N: 16384, time: ave: 0.32, 6th-best: 0.32, 6th-worst: 0.34 (of 256), ave rate: 50970
N: 65536, time: ave: 1.31, 6th-best: 1.29, 6th-worst: 1.34 (of 256), ave rate: 49929
N: 262144, time: ave: 5.36, 6th-best: 5.31, 6th-worst: 5.41 (of 163), ave rate: 48947
N: 1048576, time: ave: 21.84, 4th-best: 21.75, 4th-worst: 21.96 (of 40), ave rate: 48022
myownspecialdumper
N: 16384, time: ave: 0.25, 6th-best: 0.24, 6th-worst: 0.27 (of 256), ave rate: 66400
N: 65536, time: ave: 0.99, 6th-best: 0.97, 6th-worst: 1.01 (of 256), ave rate: 66203
N: 262144, time: ave: 3.96, 6th-best: 3.93, 6th-worst: 4.00 (of 200), ave rate: 66169
N: 1048576, time: ave: 15.87, 4th-best: 15.80, 4th-worst: 16.00 (of 50), ave rate: 66081
------- run with small numbers of iterations on reiserfs3 filesystem
MAIN pion:~$ time /usr/local/stow/python2.3-O2-athlon-xp/bin/python -OO ~/playground/mnet/mnet_new/mnetlib/scripts/benchpickle.py
NOTE: c_mencode found, using accelerated C version of mencode
pickletofile
N: 16384, time: ave: 0.24, 5th-best: 0.22, 5th-worst: 0.29 (of 117), ave rate: 68501
N: 65536, time: ave: 1.23, 4th-best: 1.14, 4th-worst: 1.38 (of 24), ave rate: 53228
N: 262144, time: ave: 8.10, 2th-best: 7.98, 2th-worst: 8.54 (of 4), ave rate: 32350
N: 1048576, time: ave: 73.52, 1th-best: 73.52, 1th-worst: 73.52 (of 1), ave rate: 14262
pickle
N: 16384, time: ave: 0.24, 5th-best: 0.21, 5th-worst: 0.31 (of 110), ave rate: 67366
N: 65536, time: ave: 1.27, 4th-best: 1.15, 4th-worst: 1.44 (of 23), ave rate: 51560
N: 262144, time: ave: 8.50, 2th-best: 8.13, 2th-worst: 8.80 (of 4), ave rate: 30831
N: 1048576, time: ave: 91.65, 1th-best: 91.65, 1th-worst: 91.65 (of 1), ave rate: 11442
banana
N: 16384, time: ave: 0.42, 5th-best: 0.40, 5th-worst: 0.46 (of 74), ave rate: 39113
N: 65536, time: ave: 1.82, 3th-best: 1.72, 3th-worst: 1.90 (of 18), ave rate: 36071
N: 262144, time: ave: 9.34, 2th-best: 9.34, 2th-worst: 9.46 (of 4), ave rate: 28054
N: 1048576, time: ave: 65.77, 1th-best: 65.77, 1th-worst: 65.77 (of 1), ave rate: 15944
mencode
N: 16384, time: ave: 0.23, 5th-best: 0.23, 5th-worst: 0.25 (of 114), ave rate: 70691
N: 65536, time: ave: 0.95, 4th-best: 0.94, 4th-worst: 0.97 (of 29), ave rate: 68771
N: 262144, time: ave: 3.93, 2th-best: 3.90, 2th-worst: 3.95 (of 7), ave rate: 66689
N: 1048576, time: ave: 16.17, 1th-best: 16.03, 1th-worst: 16.31 (of 2), ave rate: 64846
mencode_to_file
N: 16384, time: ave: 0.32, 5th-best: 0.32, 5th-worst: 0.33 (of 90), ave rate: 50632
N: 65536, time: ave: 1.32, 4th-best: 1.31, 4th-worst: 1.34 (of 23), ave rate: 49484
N: 262144, time: ave: 5.40, 2th-best: 5.39, 2th-worst: 5.41 (of 6), ave rate: 48511
N: 1048576, time: ave: 21.97, 1th-best: 21.94, 1th-worst: 22.00 (of 2), ave rate: 47720
myownspecialdumper
N: 16384, time: ave: 0.25, 5th-best: 0.24, 5th-worst: 0.26 (of 109), ave rate: 66283
N: 65536, time: ave: 0.99, 4th-best: 0.98, 4th-worst: 1.00 (of 28), ave rate: 66313
N: 262144, time: ave: 3.95, 2th-best: 3.95, 2th-worst: 3.96 (of 7), ave rate: 66306
N: 1048576, time: ave: 15.84, 1th-best: 15.81, 1th-worst: 15.87 (of 2), ave rate: 66204
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel
More information about the Mnet-devel
mailing list