Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/30/04 01:21
Read: times


 
#84079 - No Magic Wand
Responding to: ???'s previous message
Thelam Tran Nguyen said:
I'm currently using MetalLink assembler to write code ... This is a hand-down project from my boss when he left his job ... I decided to rewrite the code ... when I test and compare the codes by running it with an emulator (Ceibo DS51) with load (a real motor), it seems his code runs faster than mine

This just goes to show what I keep saying about the myth that "assembler is better:"

I don't know how many times I've said it, but simply writing your code in assembler is no guarantee that it will automatically turn out to be fast and/or small.

Assembler is just a programming language; it is not magic.
The ability to write fast and/or small code depends entirely on the skill & experience of the programmer - not on the fact that you happen to be writing in assembler.
Clearly, your old boss has managed to apply more and/or better tricks to get his code running faster.

Thelam Tran Nguyen said:
He wrote the code ... so it's hard to understand what it is.

Unfortunately, it is a characteristic of highly-optimised code that it is hard to understand. :-(
That's why it is particularly important to comment such code in detail!

List of 11 messages in thread
TopicAuthorDate
Code efficiency/performance            01/01/70 00:00      
   The human optimization            01/01/70 00:00      
      No Magic Wand            01/01/70 00:00      
   Optimizing            01/01/70 00:00      
      A non-generalizable task...            01/01/70 00:00      
         Code efficiency            01/01/70 00:00      
            Single step with index finger            01/01/70 00:00      
   Efficiency            01/01/70 00:00      
   No Magic Wand            01/01/70 00:00      
   No Magic Wand            01/01/70 00:00      
      Outstanding Effort !            01/01/70 00:00      

Back to Subject List