On Saturday, 14 March 2015 at 18:01:57 UTC, Russel Winder wrote:
On Sat, 2015-03-14 at 17:22 +0000, Chris via Digitalmars-d wrote:
[…]

Unfortunately, for speech and language processing (synthesis, speech recognition etc) Python is too slow. Everybody uses Python at first, but the serious code that is later put into real world applications is usually written in C or C++. This is a fact. I know people who developed speech analysis frameworks in Python and are now thinking of rewriting it in C++ for commercial purposes.

I can believe it is believed to be true, but this is based on metrics for using only pure Python. I bet you can get good performance just with
judicious profiling and use of Cython or better still Numba.

"Commercial reasons" may well include "we are not prepared to ship Python source code, so you will rewrite in C or C++ so we can ship a binary executable" and be nothing to do with performance. I have had
this in the past.

This may be part of it. But I know that open source free software in this sector is also written in C/C++ or Java. I haven't seen a single system that was acceptable in Python. Sooner or later they all go back to C.

I just don't see the point in using Python only to rewrite performance critical parts in C/C++ or D. Why not start with D or C from scratch. Also, I know that this Cython and C module mixing becomes a mess very quickly which makes development tricky and deployment a pain in the a**. I believe that as soon as you have to mix languages like that, there is something wrong, and you begin to rely heavily on an infrastructure that helps you to keep track of the whole mess.


Python is good for protoyping, but if you need fast applications, it is usually C/C++ (or D).

If you just use pure Python yes. But no-one does. it is always mixed systems. Why rewrite the Python that is not performance critical in C, C
++, or D, there is no point.

Reply via email to