Python performance

Darrell darrell at
Thu Mar 9 03:41:37 CET 2000

<see_plus_plus at> wrote:
> Not only the feathers were ruffled but somebody even fell out of his
> tree without any technical & commercial counter pointer.
> Whenever somebody writes a spreadsheet program in Python that outsells
> MS Excel, C can be considered as obsolete.

When I port Python --> C, I see about 6x improvement. That's after finding
the most efficient Python solution. Customers tell me that's fast enough and
don't bother with any 'C' optimizations. Partly because they would have to
deal with building code. Sure 'C' is portable with a billion #defines, a
MSVC project file and configure. I'd argue that Python is more portable,
once the interpreter is installed. How different is that from having the 'C'
compiler installed?

The algorithm makes a much larger difference though. But will you be able to
change your code base to accommodate a whole new approach? Major changes to
a Python program is much less work than an equivalent 'C' version. So
developers on huge 'C' projects grown very loudly if you talk about changing
anything. Which leaves them unable or unwilling to evolve the code.

Oh, and I saw this today.
#define free
Which had nothing to do with malloc.
Who says 'C' is better for large projects?
Have we talked about build times? You know those hour long compiles before
you discover it won't work? Left one of those going at the office today.

Don't-make-me-go-back-to-C-ly y'rs  --Darrell

More information about the Python-list mailing list