fperez528 at yahoo.com
Mon Sep 23 22:04:49 CEST 2002
Tapio Kelloniemi wrote:
>>There are other approaches, but there's no point describing them until
>>you explain why you want to do this. What are your requirements?
> I'm using Linux and searching for a good high-level language to use in
> my projects. I don't have any special ideas, it depends on language.
Early optimization is the root of all evil. --- D. Knuth.
1. Know your code is correct.
2. Know you _do_ have a problematic bottleneck.
3. Know that bottleneck is due to python's execution speed (and not choice of
a poor algorithm, I/O or network bottlenecks, etc).
_Then_ you consider optimizing it away in a compiled language. At that point,
python offers a plethora of solutions: Numeric (for number crunching), pyrex,
weave, boost.python, SWIG, CXX, SCXX, ... Some easier than others, some more
tailored to some problems than others.
But don't worry, chances are you'll find that 9 times out of 10 python is
fine, and for the cases when there is indeed a critical bottleneck (which of
course do exist), there are plenty of very convenient ways of addressing that
problem in python.
ps. Anyone care to put a summary of this issue into a FAQ, since it seems to
show up around here about once a week? Something reasonably detailed and with
links to all the current projects (I mentioned the ones I know about above,
I'm sure there's more).
More information about the Python-list