|
From: <bc...@wo...> - 2001-08-16 19:39:36
|
[John Coppola] >Was the results of this experiment uninteresting? No >comments? There seemed to be a lot of enthusiasm at >one point but no longer. Hmmm... what are you fellas >up to? I'm reviewing a book, implementing the _weakref module and fixing some random jython bugs. Thanks for asking <wink>. Your finding of a 8x speedup matches my own experience when I implemented cPickle and cStringIO. Hardening a non-trivial python module into a java class can typically give 5x to 9x faster code. The fact that cPickle.java looks so much faster then pickle.py is due to the extremely low performing (on jython) way pickle.py reads strings from the pickle. Each string read from a file cause the compilation, creation and loading of a new java class. cPickle.java avoids this by reaching deep into the internal jython implementation to reuse the string parsing from the parser. I'll look closer at your example over the weekend. regards, finn |