On Jun 21, 12:00 am, Dave Angel <da...@ieee.org> wrote: > Steven D'Aprano wrote: > > On Sun, 20 Jun 2010 18:21:43 -0400, Dave Angel wrote: > > >> Something's intrinsically wrong with the argument made in this thread > >> against generating assembly code. That's exactly what happens every > >> time you write code in C. > > > I don't know whether C compilers generate assembly mnemonics or direct > > machine code, but the distinction for this argument is irrelevant. > > > The argument in this thread is that it's not worth the *human coder* > > writing assembly, not that no assembly code is involved in the process > > anywhere. > > But the OP said of his friend: > > "He dynamically generates mashine code and call that from python." > > I took that to mean he dynamically generated machine code, not that he hired > some human to do it.
Well we know what you meant, but he did post a snippet of the code showing handwritten assembly, from which the machine code is dynamically generated. Inline assembly not too useful for general purpose Python programming, but I'm sure there's a time and place for it. I wonder how easy it'd be to bundle a small C compiler. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list