Alan Gauld, 15.03.2010 20:28:
<mark-irel...@msn.com> wrote
(apparently python is slow ?!?).

It is all relative. If you want to write fast moving graphics etc then
yes, you probably need C++. For anything else you might find Python is
fast enough.

A good approach tends to be: write it in Python first, benchmark it, find out *if* it's too slow. If so, find out *what* exactly is too slow, optimise that code, benchmark again. Iterate. If there are still parts that are too slow, move the 1-5% of your code that are most time critical into Cython. Benchmark, optimise. Iterate. And only *then*, move on to plain C/C++ if you can really prove with verified benchmarking numbers that you need to. In almost all cases, you don't. In any case, it will safe you all of the hassle of writing the entire code in C/C++, which usually safes you weeks, months or years of developer time, depending on the complexity of your application.

Stefan

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to