Wrapper round x86 Assembler

Michael Geary Mike at DeleteThis.Geary.com
Sat Apr 10 12:29:29 EDT 2004


Peter Hansen wrote:
> My main reason for pushing Pyrex as opposed to
> discussing options for assembly programming is that
> there's very little reason for people to be doing
> assembly in the world these days. C is higher level yet
> with an optimizing compiler allows better
> performance in all but a few rare cases (meaning a
> few rare problem domains and a few rare individuals).

On modern CPUs, unless you really know what you're doing, hand-written
assembly code is likely to be slower than code generated by a good
optimizing C/C++ compiler. If your assembly code is at all straightforward,
it will definitely be slower than compiled code, because you'll be stalling
the CPU all over the place when one instruction waits for the results of a
previous one.

-Mike





More information about the Python-list mailing list