[IPOL discuss] python as an addition to c++

Miguel Colom colom at cmla.ens-cachan.fr
Thu Jun 6 09:30:50 CEST 2013


Quoting Nicolas Limare <nicolas.limare at cmla.ens-cachan.fr>:
>> A parallelized C/C++ as those we have in the current IPOL
>> publications are complete programs that once compiled run at their
>> fastest speed using CPU native instructions.
>> They're only limited by the power of the machine where the run on.
>
> I am no very sure of that, Miguel. We could also say that they are
> very limited by the skills of the developper in low-level
> optimizations. And sometimes the Python/NumPy internals will be better
> coded than a researcher's C code, and the python version could be
> faster. I'll try with a (simplistic) code of mine, to have some
> numbers for a comparison.

Yes, I think that it's an easy check: to look in the published code  
for operations (patch comparisons, and so on) that in principle are  
not handled by libraries, since they're the algorithm code.

All these code is likely to slow down the execution of the algorithm  
in it's Python version.

However, I'm not saying that we should oppose to the use of Python  
code. We have to study the pros and cons and decide accordingly.

Python is a very good language and many people use it for scientific  
computations. But we have must have in mind that we are likely to face  
an important performance loss if we use it.




More information about the discuss mailing list