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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/19/12 14:43
Read: times


 
Msg Score: -1
 -1 Message Not Useful
#185565 - Understanding the mapping important
Responding to: ???'s previous message
Erik Malund said:
if you need to "understand the efficiency" you should not use C in the first place

I don't agree.

Being able to understand the efficiency of the compiler and how language constructs maps to processor instructions gives you options when writing C/C++ code.

For trivial things, the compiler can convert integer multiply of 2 with a shift. But think about 8051 and pointers. When you do know the limitations the 8051 chip has when using indirect addresses, you can focus on designing without pointers or at least with no more pointers than the compiler can manage to map to index registers in the processor.

Code bloat is often the result of people not knowing what is cheap and what is expensive, when they write their C/C++ program.

It is only by knowing the mappings performed that you can know that for one processor, recursion is basically no-cost, allowing very clean code to run efficiently. While you on the 8051 probably need to store explicit state information in a table - a manually administered stack.

List of 49 messages in thread
TopicAuthorDate
interfacing with 93c66            01/01/70 00:00      
   Interfacing AT93CXXX Serial EEPROMs with AT89LP MCUs            01/01/70 00:00      
      Direct Links            01/01/70 00:00      
   interfacing ith93c66            01/01/70 00:00      
      Better Learn Both            01/01/70 00:00      
      How about the 8051 code library?            01/01/70 00:00      
         interfacing with 93c66            01/01/70 00:00      
            An exercise for the reader            01/01/70 00:00      
               interfacing with 93c66            01/01/70 00:00      
      Then you need to learn...            01/01/70 00:00      
         I disgaree            01/01/70 00:00      
            cheap fatty sausage            01/01/70 00:00      
               Understanding the mapping important            01/01/70 00:00      
                  out of context            01/01/70 00:00      
                  So exactly what was the disagreement???            01/01/70 00:00      
                     I agree with you            01/01/70 00:00      
                        Don't simplify to believe it's about fastest speed            01/01/70 00:00      
                        again            01/01/70 00:00      
                     true            01/01/70 00:00      
               Are you serious?            01/01/70 00:00      
                  also out of context            01/01/70 00:00      
               Missing the point!            01/01/70 00:00      
                  the full monte            01/01/70 00:00      
   interfacing with 93c66            01/01/70 00:00      
      And your work            01/01/70 00:00      
      plz check it            01/01/70 00:00      
      ,sometimes you have to be VERY specific            01/01/70 00:00      
      wrong strategy and many errors            01/01/70 00:00      
   interfacing with 93c66            01/01/70 00:00      
      why do you resist using external ram?            01/01/70 00:00      
         interfacing with 93c66            01/01/70 00:00      
            Payed support not good enough?            01/01/70 00:00      
               interfacing with 93c66            01/01/70 00:00      
                  Any Specific Reason for using...            01/01/70 00:00      
                     interfacing with 93c66            01/01/70 00:00      
                        please explain            01/01/70 00:00      
                        It is advisable to use alternate available....            01/01/70 00:00      
                           interfacing with 93c66            01/01/70 00:00      
                              Can you elaborate it ?            01/01/70 00:00      
                                 interfacing with 93c66            01/01/70 00:00      
                                    You give me your email-id            01/01/70 00:00      
                                       email id            01/01/70 00:00      
                                          Ok            01/01/70 00:00      
                  Wrong - you are just not responding to on-topic questions            01/01/70 00:00      
                  you've got plenty of suggestions            01/01/70 00:00      
                     Off-topic but Siemens/seconds...            01/01/70 00:00      
                     funny result            01/01/70 00:00      
                        Output            01/01/70 00:00      
   still waiting            01/01/70 00:00      

Back to Subject List