Is this make sence? Dynamic assembler for python
Rhodri James
rhodri at wildebst.demon.co.uk
Sun Jun 20 17:45:14 EDT 2010
Mixing Python and assembler is a bizarre thing to want to do in general,
but...
On Sun, 20 Jun 2010 01:52:15 +0100, Steven D'Aprano
<steve at remove-this-cybersource.com.au> wrote:
> (3) Modern C compilers can produce better (faster, more efficient)
> machine code than the best assembly code written by hand.
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. I wrote more at a
previous job, but then the processor had instructions that could not be
expressed usefully in C, and having an FFT routine that ran like greased
lightning was important.
I would agree, though, that the only reason I can think of for wanting to
mix Python and assembler is if you are grobbling about with hardware, and
if you are doing that, Python wasn't the best place to start from.
--
Rhodri James *-* Wildebeeste Herder to the Masses
More information about the Python-list
mailing list