[clug] assembly performance

Martin Pool mbp at sourcefrog.net
Fri Jun 10 03:59:11 GMT 2005

On 10 Jun 2005, Adrian Blake <A.Blake at physics.usyd.edu.au> wrote:

> In assembly code on the modern micros are we addressing and manipulating 
> the silicon or just talking to a virtual processor ?

Yes, you can look at it either way.  

How do you define "addressing and manipulating the silicon" so as to
exclude microcode?

> If assembly code operates the silicon the performance is dependent upon 
> the skills of the assembly coder. But if the assembly code is 
> interpreted by a lower level code that simulates a virtual machine then 
> the performance can vary and the user is at the mercy of the microcoder.

Well, yes, performance can vary if the design of the processor
changes, whether that be the microcode or any other level.  I don't
see why this worries you.

What is done in microcode and what is done in hardwired logic is an
engineering tradeoff made by the chip designers to balance design
time, debug time, die cost, power usage, etc...  Using microcode might
slow down a rarely-used instruction, but save space and allow for more
cache lines at a given cost.

As I recall, AMD chips are said to do more things in microcode than
Intel x86, but make it up in other areas and are by and large
competitive.  That is to say, various tradeoffs can work.

Beyond this point you probably need to refer to a good textbook.


More information about the linux mailing list