Python speed vs csharp

Alex Martelli aleax at aleax.it
Mon Aug 4 07:19:07 EDT 2003


Siegfried Gonzi wrote:

> Alex Martelli wrote:
> 
>> Still, the performance ratio of psyco-optimized Python vs C on my
>> machine is much better than that of bigloo vs C on Mr Gonzi's Celeron,
>> and with no need for type declarations either.  So much, then, for
>> Mr Gonzi's claims about Python being "more or less crap"!-)
> 
> Oh man. I forget to tell if you comment out
> 
> (x (exact->inexact x))

...presumably avoiding floating-point in favour of rational...

> the Bigloo version calculates things in 0.25 seconds (as compared to 0.5
> seconds of the C version).

If true, this suggests unbelievably bad performance in your Celeron's
floating-point hardware -- there's no other explanation as to why
(software-implemented) rational arithmetic could outperform (hardware-
implemented) float arithmetic.


> Okay, a lot of people have learned a lot from your post. Maybe they can
> use some techniques for their own Python programming.

Particularly given that the Python-specific "techniques" amount (in all) 
to using a good optimizer (aka just-in-time compiler), psyco, I'm quite
confident that many people can indeed use that.  The idea of writing
x*x instead of pow(x, 2.0) is just as good in C (as I've shown -- just
that one change speeds up the C program by about two times) or Fortran
(as I mentioned, it was for Fortran, over a quarter of a century ago,
that I first learned of it) as just about any other language, so it's
no doubt going to be even more widely applicable.


> But still Python is crap. Sorry to tell you the truth. It is not only
> speed. Look if I do not use types in Bigloo it is 10 times slower than
> C. So performance is not everything; at least for me.

Python is demonstrably more productive than lower-level languages (such
as C) for application development, and demonstrably more acceptable to
most programmers than languages of similar semantic level but with prefix
rather than infix syntax.  Therefore, your repeated flame-bait assertion
that "still Python is crap", now totally unsupported, has sunk to abysmal
levels (I don't see what more you could do to further lower your
credibility).

You've shown how good you are at numerical programming by coding
"pow(x,2.0)" where any decently experienced coder would have coded
"x*x" and thereby slowing down a whole C program by a factor of two.  Now
you show that your ability in evaluating programming languages is
on a par with your ability in numerical programming -- unsurprising.


> But Mr. Martelli your post was very funny. It is always a pleasure for
> me to make loosers upset (yes I know your contribution to Python is huge
> especially because you are book author). Oh, man I always thought such
> individuals are just in the CommonLisp community.

Is a "looser" somebody who is more loose (less uptight) than you, or
somebody who looses (as in, eases, facilitates) things?  Or is your
ability at spelling on a par with your ability at numerical programming
and language evaluation?  In the latter case, you're surely reaching
for an interesting "across the board" overall score.

My contributions to Python have been pretty minor -- writing books is
nice, sure, but of course it can't compare with the real contributions
of the "core" Pythonlabs developers and those of many others.  Nor did
you make me _upset_ -- disgusted, yes, because I'm an optimist and like
human beings in general, and it's always sad to see such a sad specimen
as you attempt to pass itself off as a human being.  As for "such
individuals" (such as?) being "just in the Common Lisp community", what
would that be describing?  Was your working hypothesis that, when you
post to a newsgroup about language X a flamebait about X being crap,
accompanied by technically faulty examples in non-X languages, somebody
will point out your idiocy only if X == "Common Lisp"?  If so, then your
understanding of Usenet is on a par with your ability at numerical
programming, and so on -- truly, truly a sad ersatz-human being there.


> If you are pragamatic Python is okay and has a lot to offer.

More fodder for the "he spells as well as he programs" theory, I see.
Not to mention that "is crap" and "is okay" are compatible only in
the field of natural fertilizers (a field I heartily recomment you
turn to, given your proven abilities in spewing male bovine exrement).


Alex





More information about the Python-list mailing list