gas vs. nasm: which assembler produces the best code?

user157000 picture user157000 · Aug 15, 2009 · Viewed 7.6k times · Source

Both tools translate assembly instructions directly into machine code, but is it possible to determine which one produces the fastest and cleanest code?

Answer

Mehrdad Afshari picture Mehrdad Afshari · Aug 15, 2009

When you're writing in assembler, you are precisely describing the instructions to generate so it doesn't depend on the assembler. It depends on you. There's a one-to-one correspondence between the mnemonics you write and actual instructions in machine code.