Wrapper round x86 Assembler

Peter Hansen peter at engcorp.com
Sun Apr 11 22:16:01 EDT 2004


Michael Geary wrote:

> 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.

I think that's what I just said...



More information about the Python-list mailing list