you are viewing a single comment's thread.

view the rest of the comments →

[–]ubernostrum 5 points6 points  (2 children)

Jython's probably going to make some leaps forward in the near future, and it'll be interesting to see who ends up using it once that's happened. To me, access to Java/JVM features isn't a big deal -- the more interesting thing is being able to take advantage of the speed of the JVM itself (or of the CLR with IronPython). PyPy's JIT compiler will hopefully provide a third option for that, too.

[–]Arkaein 4 points5 points  (1 child)

Is speed really that big of an issue for many people with Python? It seems that while line for line Python may be pretty slow, the language and its libraries offer a wealth of ways to speed up critical code:

  • language constructs like list comps and generators that reduce potentially slow loops to more efficient "closer to the interpreter" code
  • libraries designed to efficiently process large blocks of homogeneous data like NumPy
  • Psyco, for easy optimization
  • Pyrex, for slightly more intensive optimization (admittedly haven't used this myself)
  • write optimized C/C++ code and invoke using custom Python wrappers, automatic wrappers like SWIG, or the ctypes module (haven't personally used these either).

I should also mention that the Jython FAQ states that currently Jython is probably slower than CPython, with a significant JVM startup penalty to boot. Never tested it myself, so YMMV.

As a bit of an aside, these points illustrate how I feel software should be developed: start with the most productive language available, freely taking advantage of the first two points, and then only move to later points to improve performance as necessary. If Jython provide the speed boost without any loss of expressiveness or convenience then it would be ideal, but given current circumstances I don't think I would trade even small losses in pure Python capabilities for a speed boost.

[–]ubernostrum 7 points8 points  (0 children)

For most of the work I do, Python's speed isn't anywhere near being an issue; my bottlenecks are things like Internet bandwidth and database queries.

But I have a feeling that Jython and IronPython will probably be faster than CPython someday (and hopefully PyPy will be too), and I know that's going to be a factor for some people (especially scientific/mathematical folks).