Chris Angelico <> writes:

> On Fri, Jun 6, 2014 at 6:07 AM, Alain Ketterlin
> <> wrote:
>>> Perhaps, perhaps not. My experience is that only a small percentage of
>>> the CPU time is spent in the Python interpreter.
>> Basically, you're saying that a major fraction of python programs is
>> written in another language. An interesting argument...
> No, a major fraction of Python program execution time is deep inside
> code written in another language. In extreme cases, you might have a
> tiny bit of Python glue and the bulk of your code is actually, say,
> FORTRAN - such as a hefty numpy number crunch - which lets you take
> advantage of multiple cores, since there's no Python code running most
> of the time.

This is actually what I meant. I find it sad to keep Python such a glue
language (the kind of language you throw away when the trend
changes---like Perl for example).

> And that's counting only CPU time. If you count wall time, your
> typical Python program spends most of its time deep inside kernel API
> calls, waiting for the user or I/O or something.

But this is true of any IO-bound program, whatever the language. I see
no reason why Python should be restricted to simple processing tasks.

-- Alain.

Reply via email to