|
From: john c. <joh...@ya...> - 2001-07-31 03:13:03
|
I have not yet been able to find an answer to this question. I understand that the development aim behind Jython is to be closely matched to cPython. However, this would be an interesting place for Jython to diverge from cPython. CPython implements a global interpreter lock which prevents multiple threads from running on multiple CPUs. A single multi-threaded cPython process makes little use of the extra processing horsepower available on enterprise class SMP server configurations. The java threading model supports both OS native threads and "green" threads depending on the JVM used. If Jython is based on the Java threading model. With a fair degree of good software design, it is actually possible for a multi-threaded Jython process to run faster than the corresponding cPython process. So the factor 2 which comes up so frequently when comparing the speed of Jython to cPython is somewhat irrelevant and largely depends on the context of which it is used. If Jython is based on the Java threading model, a server comprised of 4 CPUs could potentially out pace the cPython process by a factor of 2. I feel this is a very important distinction between the two varieties of python, and for enterprise class systems, the use of Jython may be preferred. I am an avid Jython user. Jython has a way of making Java seem very simple. I'm impatient and like to get to the point of things quickly. I am currently using Jython in conjunction with the java accessibility package. I find it extremely indispensable since I can run the program I want to interface from the interpreter by calling main, then poke around at the interpreter prompt. It's a very powerful tool. John Coppola joh...@ya... __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ |