Is this make sence? Dynamic assembler for python

Rhodri James rhodri at wildebst.demon.co.uk
Mon Jun 21 17:39:56 EDT 2010


On Mon, 21 Jun 2010 04:34:40 +0100, Steven D'Aprano  
<steve-REMOVE-THIS at cybersource.com.au> wrote:

> On Sun, 20 Jun 2010 22:45:14 +0100, Rhodri James wrote:
>
>> No.  Modern C compilers often produce very good machine code, but the
>> best hand-written assembly code will be better.  I can usually write
>> *very* marginally better code than GCC achieves at work, though 99% of
>> the time I don't because it would be a maintenance nightmare.
>
> Not that I don't believe you, but that is an extraordinary claim that
> would require more evidence than just "Hey, some guy on the Internet
> reckons his assembly code can regularly out-perform optimizing C
> compilers" before I will change my opinion *wink*

Fairy 'nuff.  In this case it's a matter of having a simple processor and  
knowing a trick or two that our in-house compiler apparently doesn't.  Or  
didn't, since it has improved recently.  Oh, and having done this for a  
decade or two :-)

But like we've been agreeing, most of the time knocking an instruction or  
two out of a function isn't worth the effort.

-- 
Rhodri James *-* Wildebeeste Herder to the Masses



More information about the Python-list mailing list