how fast is Python?

Andrew Dalke adalke at mindspring.com
Wed Aug 27 19:00:35 EDT 2003


Steven Taschuk:
> A bit off-topic perhaps, but I'd be interested in the details of
> [your] anecdote.

Okay.  I know someone who really likes optimized programming.
The kind of person who will develop an in-memory compiler
to generate specialized assembly for the exact parameters used,
thus squeezing out a few extra cycles.  He works in a C++ company.
They used an idiom, the details of what I don't know.  Most
people wouldn't use that idiom because it didn't translate well
to assembly, but the compiler in theory could figure it out.  He
submitted a patch to do that optimization.  It was originally
rejected because they couldn't see that anyone would write
code that way.  He dug around in gcc itself to find some place
which used that code, to show that it is used.  It was accepted.

Moral: it's easier to change the technical details (gcc) than
the social ones (getting people to use a better idiom).

That's about all I know of the story.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list