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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/05/06 17:28
Read: times


 
#115706 - It's a thorny issue
Responding to: ???'s previous message
Erik,

Everyone has his own domain in which what's been the crux for him resides. I think it's possible to devise a set of test routines that would, thoroughly enough, test the compiler output to allow for a reasonable comparison.

Your comment, "It is truly amazing how little memory well crafted apps require." is quite correct, but it's not typical that compilers produce such code, code that's both small and fast. That's generally done using the assembler. If one compiler did it and the other didn't, I'd certainly want to be aware of it, though.

IMHO, paging is easy enough to handle, but the overhead is costly. If you want to use relocatable code, it's not memory efficient, since you have to carry along a bit table indicating which bytes have to be modified, and then you have to modify them when you're loading 'em. If you want to manage the paged code as overlays, you certainly can't expect the compiler to do that for you efficiently for all cases. If you really want to test paging, e.g. in cases where there are colocateable tables to be overlayed by different routines, I think it's still too much to expect of a compiler.

The compilers are designed for the "standard" memory model, up to and including the maximum for which the MCU was designed. Extending beyond that is probably an indication that the choice of MCU's was wrong.

Yes, a valid test would include the points you've made. How well it does integer operations, how well it does floating point, well, those comparisons are optional, particularly since a floating point package isn't a language-specific option. It could be included, I suppose, but then, how often does it come up in the "real" world?

I mentioned the NMIY SmallC source-code example because it scans a keypad and it talks to the LCD, which involves timing and could involve table lookups if combined with an appropriate serial input to LCD output task. What's more it provides a model that can be followed pretty closely so the it doesn't become a contest between the cleverness of one coder versus another. After all, someone wanted to compare the free Pascal compiler with the equally free SDCC, right?

RE


List of 61 messages in thread
TopicAuthorDate
asembly or c?            01/01/70 00:00      
    A million opinions probably            01/01/70 00:00      
      my level            01/01/70 00:00      
         C vs Assembly            01/01/70 00:00      
            Deatails Please            01/01/70 00:00      
               Later            01/01/70 00:00      
                  and is negative results as well thanks            01/01/70 00:00      
                     Pure Assembly            01/01/70 00:00      
                        writing in assembler is fine if......            01/01/70 00:00      
                        Mixed Language Programming            01/01/70 00:00      
                           Most cases            01/01/70 00:00      
                        word choice            01/01/70 00:00      
            Oh no, that old chestnut again!            01/01/70 00:00      
            C is better            01/01/70 00:00      
               No! It depends            01/01/70 00:00      
                  Absoultely!            01/01/70 00:00      
         C51 Primer !            01/01/70 00:00      
         Was            01/01/70 00:00      
         I like C, but...            01/01/70 00:00      
            blah, blah, blah            01/01/70 00:00      
               Relative choise            01/01/70 00:00      
                  Oh no, that old chestnut yet again!            01/01/70 00:00      
                     Optimization Trail            01/01/70 00:00      
                     good usage of a tool            01/01/70 00:00      
                        don't you know OVERLAYABLE            01/01/70 00:00      
                           All assemblers are not equal?            01/01/70 00:00      
                              I mentioned Keil in my post            01/01/70 00:00      
                           Why the half step only ?            01/01/70 00:00      
                              internals?            01/01/70 00:00      
                                 offtopic but...            01/01/70 00:00      
                  Please            01/01/70 00:00      
                     HHL?            01/01/70 00:00      
                        Yes            01/01/70 00:00      
                     bingo and a bit more            01/01/70 00:00      
                  powerful macros            01/01/70 00:00      
                  There's the catch!            01/01/70 00:00      
   Both            01/01/70 00:00      
   Hmmm            01/01/70 00:00      
      Choice Between Two Female            01/01/70 00:00      
   Use neither !            01/01/70 00:00      
      how can that be 'neither'            01/01/70 00:00      
      Hey - there's TWO of you            01/01/70 00:00      
          nooooo            01/01/70 00:00      
            Rumbled!            01/01/70 00:00      
      Yeeeee HAAAAAH            01/01/70 00:00      
         font in the greek alphabet that is very            01/01/70 00:00      
         Yes, but...            01/01/70 00:00      
            No bounds checks            01/01/70 00:00      
               How about an LCD driver on a '52?            01/01/70 00:00      
                  Who gives a hoot about 'memory usage' wh            01/01/70 00:00      
                     Some people do ...            01/01/70 00:00      
                        that is not the argument            01/01/70 00:00      
                           Maybe there's another way            01/01/70 00:00      
                              who is off topic now?            01/01/70 00:00      
                                 True, but why?            01/01/70 00:00      
                                    where is the diversion            01/01/70 00:00      
                                       It's a thorny issue            01/01/70 00:00      
                     The Benchmark delema            01/01/70 00:00      
                  Sieve of Erasthothenes            01/01/70 00:00      
                     The prime finder is a mathematical proce            01/01/70 00:00      
                        therefore it's inadequate on its own            01/01/70 00:00      

Back to Subject List