Re: Compiling C++ modules

Avi Kivity
2006-04-28T17:03:14Z

Jan Engelhardt wrote:
>> The high level language allows you to concentrate on the algorithms which is
>> where the performance comes from.
>>
> Do you consider e.g. Perl or Python highlevel?
>

I once wrote Perl. I deeply regret the experience. But yes, they are
both high(er) level. There are even higher levels to aspire to.

> If so: I doubt that's where performance can come from. Ever. (Unless you
> cheat by using XS.)
>

Given infinite time, patience, and concentration, the C or C++ program
will always win over Python; as assembly will win over C or C++.

If your time is bounded, your Python code might be running while you're
still typing in your C code, you're be profiling and making changes to
the alghorithm in Python while hunting for that mysterious segmentation
fault in C (thank goodness for valgrind), and adding multithreading to
the third and final version of your Python code while debating whether
to buy more memory or sit down and chase that memory leak.

Developer performance equates to runtime performance.

ps. Yes, that wouldn't work for a simple example like counting words in
a file. Try something more complex, like an SCM system.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.