python simply not scaleable enough for google?

Alf P. Steinbach alfps at
Sat Nov 14 09:47:28 CET 2009

* sturlamolden:
> On 12 Nov, 18:32, "Alf P. Steinbach" <al... at> wrote:
>> Of course Python is slow: if you want speed, pay for it by complexity.
> Python is slow is really a misconception.

Sorry, no, I don't think so.

But we can't know that without ESP powers.

Which seem to be in short supply.

> Python is used for
> scientific computing at HPC centres around the world. NumPy's
> predecessor numarray was made by NASA for the Hubble space telescope.
> Python is slow for certain types of tasks, particularly iterative
> compute-bound work. But who says you have to use Python for this?  It
> can easily be delegated to libraries written in C or Fortran.

Yes, that's what I wrote immediately following what you quoted.

> I can easily demonstrate Python being faster than C. For example, I
> could compare the speed of appending strings to a list and "".join
> (strlist) with multiple strcats in C. I can easily demonstrate C being
> faster than Python as well.

That is a straw man argument (which is one of the classic fallacies), that is, 
attacking a position that nobody's argued for.

> To get speed from a high-level language like Python you have to
> leverage on high-level data types. But then you cannot compare
> algorithms in C and Python directly.
> Also consider that most program today are not CPU-bound: They are i/o
> bound or memory-bound. Using C does not give you faster disk access,
> faster ethernet connection, or faster RAM... It does not matter that
> computation is slow if the CPU is starved anyway. We have to consider
> what actually limits the speed of a program.
> Most of all I don't care that computation is slow if slow is fast
> enough. For example, I have a Python script that parses OpenGL headers
> and writes a declaration file for Cython. It takes a fraction of a
> second to complete. Should I migrate it to C to make it 20 times
> faster? Or do you really think I care if it takes 20 ms or just 1 ms
> to complete? The only harm the extra CPU cycles did was a minor
> contribution to global warming.

Yeah, that's what I wrote immediately following what you quoted.

So, except for the straw man arg and to what degree there is a misconception, 
which we can't know without ESP, it seems we /completely agree/ on this :-) )

Cheers & hth.,

- Alf

More information about the Python-list mailing list