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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/22/09 16:18
Read: times


 
#166355 - More than one way to skin a cat
Responding to: ???'s previous message
Richard said:
I agree with the notion that one should look at a compiler's output with optimization turned off in order to see what it generates.

Looking at the code with optimization off, is only meaningful when debugging errors in the C code, or you suspect the compiler vendor to have gravely misunderstood a language construct (and not in the code generation).

If you intend to ship a product where the code is built with optimization (size and/or speed) turned on, then it's only meaningful to look at the optimized code. On one hand, you will not know how well the compiler will map different C constructs to the target hardware if you look with optimization turned off - without optimization, the compiler vendor is allowed to produce absolutely lousy code. On the other hand - only if looking at the optimized code will you have a chance to spot potential problems. Without optimization, the generated code may look like every single variable had the volatile keyword.

A big issue here is still that the cost of a chip doesn't naturally follow from the supported clock frequency or amount of flash or RAM. In the end, a chip capable of "wasting" 70% of the time and flash can be cheaper than a chip with optimum size to handle your optimized assembler. And it can draw less current.

This is an old document, but the information is worth reading anyway - you can get quite nice ARM chips for $1.
http://www.bluewatersys.com/docs/whit..._micro.pdf

There is more to it than meets the eye. The customer may like a cheap product with low energy consumption and well-working firmware that has a low maintainance cost. The number of bytes of flash used is most probably not something the customer spends sleepless nights about.

List of 54 messages in thread
TopicAuthorDate
Project using 89s52            01/01/70 00:00      
   RET (Where?)            01/01/70 00:00      
      Loops?            01/01/70 00:00      
         Loops?            01/01/70 00:00      
            with a quick glance            01/01/70 00:00      
               with a quick glance            01/01/70 00:00      
                  search for ...            01/01/70 00:00      
            Loops Something like this            01/01/70 00:00      
               School work?            01/01/70 00:00      
                  Nope            01/01/70 00:00      
               Loops Something like this            01/01/70 00:00      
                  ?...Doesnot Work...?            01/01/70 00:00      
                     ?...Doesnot Work...?            01/01/70 00:00      
                        Correct            01/01/70 00:00      
                        You sure you get a line feed before RFID?            01/01/70 00:00      
                            You sure you get a line feed before RFID?            01/01/70 00:00      
                              Try This            01/01/70 00:00      
                                 Try This            01/01/70 00:00      
                                 error            01/01/70 00:00      
                                    it's bible time            01/01/70 00:00      
                                       it's bible time            01/01/70 00:00      
                                    Is it ERROR or DOUBT???            01/01/70 00:00      
                                       Is it ERROR or DOUBT???            01/01/70 00:00      
                                 Compare            01/01/70 00:00      
                                    Simulate your function.            01/01/70 00:00      
                                       Simulate your function.            01/01/70 00:00      
                                          Use the free Keil C compiler Evaluation            01/01/70 00:00      
                                    COMPARE            01/01/70 00:00      
                                       compare            01/01/70 00:00      
                                          Still not out of time for C            01/01/70 00:00      
                                             Still not out of time for C            01/01/70 00:00      
                                                Read up on pointer            01/01/70 00:00      
                                                   Read up on pointer            01/01/70 00:00      
                                                      Me or you?            01/01/70 00:00      
                                                   Or do not use a pointer            01/01/70 00:00      
                                                      working code            01/01/70 00:00      
                                                         Describe your work process            01/01/70 00:00      
                                                            v            01/01/70 00:00      
                                                               Did you read? Did you debug?            01/01/70 00:00      
                                                         Why dont you define correct id in "code" space            01/01/70 00:00      
                                                            Hoping to get someone relegated?            01/01/70 00:00      
   Reading or Transmitting Data            01/01/70 00:00      
      Reading or Transmitting Data            01/01/70 00:00      
   a trip to the wild blue younder            01/01/70 00:00      
      This is where it gets lost            01/01/70 00:00      
   The fundamental problem is...            01/01/70 00:00      
      Same as its always been,            01/01/70 00:00      
         Yep I cannot think            01/01/70 00:00      
            Yep I cannot think            01/01/70 00:00      
               Why too late?            01/01/70 00:00      
            for a simple task ...            01/01/70 00:00      
               More than one way to skin a cat            01/01/70 00:00      
                  my $0.02            01/01/70 00:00      
                     If you can not code it in ASM ...            01/01/70 00:00      

Back to Subject List