When Python outruns C++ ...

Max Khesin max at cNOvSisiPonAtecMh.com
Tue Apr 1 03:44:51 CEST 2003


> Yes, but humans aren't good optimizing compilers.
So who writes optimizing compilers? :). Anyway, there are lots of
super-optimized C++ libs that take advantage of C++ access to the machine
and compile-time decision-making, look at oonumerics.org for some examples.
Additionally more on Alex'es (OP) experiment: lots of optimizations can be
done in C++ for string ops, Andrei Alexandrescu had a nice article on this
topic on the CUJ site. Basically his lib allows you to set some compile type
params of his string class which optimize it for particular usage (e.g.
short-string optimizations, reference-counting optimizations etc). I can
only think that such a library would outdo STL or Py string since it allows
you a very late desicion on the binary implementation.






More information about the Python-list mailing list