[SciPy-user] python (against java) advocacy for scientific projects

Sebastien Binet hep.sebastien.binet@gmail....
Tue Jan 20 04:50:08 CST 2009


hi,

[snip]

> 3. The lack of a real JIT compiler is a serious issue if the use cases
> involve more than linear algebra and differential equation solvers. In many
> such cases, for-loops and/or while-loops are the only reasonable solutions,
> both of which, very often, execute much faster under Matlab or Java. Some
> operations are simply not vectorizable if you wish to have maintainable
> code, e.g., large groups of interacting state machines.
there is already *some* support for JITing stuff, and integrated with numpy.
Look at the nice code from Ilan:
http://www.enthought.com/~ischnell/mkufunc.html
which uses PyPy to translate relatively non-dynamic python code (aka RPython) 
into C.

On the same note, I always wondered if one could not sidestep the for-loop 
overhead with an ad hoc Context manager which would suppress/shortcut the 
dynamic nature of python for very localised pieces of code:
 with NotDynamic() as ctx:
   for i in xrange(10):
     ...
where all the usual dynamic type checking would be done once (to 
discover/infer the types) and then cached for subsequent loops...

cheers,
sebastien.
-- 
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################






More information about the SciPy-user mailing list