Language comparisons

Steve Holden sholden at holdenweb.com
Wed May 9 01:57:54 EDT 2001


"Grant Edwards" <grante at visi.com> wrote in message
news:slrn9fheu4.o0u.grante at isis.visi.com...
> In article <QM%J6.96455$HF.21774089 at news4.rdc1.on.home.com>, Nick Perkins
wrote:
>
> >Things can usually be done many ways in python, and it is
> >rarely obvious which will be fastest.
>
> That's an interesting observation.  I don't think it's true about C -- but
C
> is much lower level and an experienced programmer will have a pretty good
> idea what code the compiler will generate for various constructs (at least
> that's the case in the embedded world -- maybe it isn't for other
> environments).
>
Perhaps you have been working in one environment long enough to thoroughly
absorb its constraints and architecture, but a poor choice of algorithm can
make even C run like a drain -- running an inefficient algorithm fast id
just as bad as running an efficient one slowly (worse, in fact).

> Is that observation generally true of higher-level languages like Python,
> Scheme, and Smalltalk -- or is there something about Python that makes it
> uniquely difficult to guess what will be the fastest?
>
Dunno. But implementation differences have recently been pointed out in
string construction techniques, which seems to imply that a given Python
program will have different efficiencies on different platforms.

personally-i-tend-not-to-optimize-per-platform-even-though-it's-sometimes-de
sirab-ly y'rs  - steve




More information about the Python-list mailing list