On Thu, 30 Mar 2006, [EMAIL PROTECTED] wrote:
Excellent. We'll be changing information about PyLucene in the upcoming Lucene
in Action 2.0 edition then.
How is the performance now comapred to the SWIG version?
It depends. If the amount of work performed by the actual Java Lucene API is
minimal, then the new code is quite a bit faster. If the work is significant,
then it is a drop in the bucket. For example, instantiating Java's Object
class should represent a pretty minimal amount of work and python's timeit
module reports:
python -m timeit "from PyLucene import Object" "Object()"
with SWIG: 10 loops, best of 3: 32.9 usec per loop
without SWIG: 10 loops, best of 3: 13.1 usec per loop
From that it would mean that crossing the python to C++/Java barrier can be
over twice as fast. Seriously, I wouldn't read too much into these timings
unless you're in a very tight loop making lots of calls to very cheap APIs.
Andi..
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev