pain

Kent Johnson kent37 at tds.net
Fri Aug 5 15:03:11 EDT 2005


Mike Meyer wrote:
> Grant Edwards <grante at visi.com> writes:
> 
> 
>>On 2005-08-03, Mage <mage at mage.hu> wrote:
>>
>>
>>>Isn't jython slower (I mean performance) than java? As well as
>>>I understand jython code will be interpreted twice.
> 
> The compiled jython will pay a performance penalty for being
> dynamic. Where Java knows the type of objects, and can deduce the
> correct method to call at compile time (well, some of the time,
> anyway), the jython code will have to do a method search at run time.

Yes, the compiled code makes heavy use of the Jython runtime to get anything done.

*But* most of the hard work will probably be done by Java code in libraries you call. For example a Swing UI, XML parsing, database calls, etc all will happen in Java code. So in practice the performance penalty is not significant and is more than offset by the productivity benefit.

Kent



More information about the Python-list mailing list