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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/11/05 04:50
Read: times


 
#103558 - Quick comparison: SDCC vs Keil
Responding to: ???'s previous message
I just did a quick-and-dirty comparison based on some SecureDigital/FAT12 code I've been developing under Keil. I did my best to adapt it to SDCC (I downloaded the nightly snapshot from Nov. 10th, 2005).

It was a little work since SDCC didn't directly support the MCU I was using (Dallas DS89C450) so I had to create a header file. Keil included it.

I also found that although I don't normally use scanf in any environment, much less MCS-51, I was using it in my current development for testing purposes. SDCC doesn't seem to include that in the stdio library. So since I was just in a hurry to compare a few apples, I simply removed my single reference to scanf in both Keil and SDCC.

Keil compiles my three source files on a 450MHz Windows XP machine in less than a second. SDCC took just over 6 on a 1.6GHz Linux machine.

I configured both Keil and SDCC to optimize for code size. The resulting code size was 9,895 bytes for Keil and 12,415 bytes for SDCC. That's almost exactly 25% larger for SDCC. And, as-is, I know my application won't work because SDCC doesn't seem to have scanf.

Now I'm not knocking SDCC. I used it for my last C-based project and it worked out fine, with a little hammering (I had to declare numerous functions as reentrant so it would use the stack and not run out of variable storage space). And I won't say that this quick test is definitive or perfect, but a quick test shows that:

1. I had to create my own header file because the headers SDCC includes isn't very comprehensive. That took time.

2. I had to remove scanf from my application to make it compile under SDCC, so obviously the "benchmark" isn't even functional right now. Had I wanted to make it work, I would've had to write a scanf function.

3. As far as I can tell, SDCC made me write a putchar function so that printf could call it. While it is perfectly necessary to allow a developer to write his or her own putchar routine, it does seem logical that a "default" putchar that uses SBUF and TI ought to be included. Keil includes a default putchar whereas I had to write one for SDCC.

4. Keil compiles at least 6 times faster on a slower machine than SDCC does on a faster machine. I'm personally not too concerned about this since the size of a given 8051 project is not usually so lage that this is a major issue, but it is worth noting.

5. With code-size optimization on both systems, SDCC produced code 25% larger.

So while I had no problems using SDCC in my last development, I don't think I'd go as far as saying that there's "no need" for commercial compilers. A 25% difference in code size is still pretty significant, especially on a platform that is generally limited to 64k code size.

Regards,
Craig Steiner


List of 90 messages in thread
TopicAuthorDate
ARM buys Keil!            01/01/70 00:00      
   ARM buys Keil: Good or bad?            01/01/70 00:00      
      Good question!            01/01/70 00:00      
         Can't be bad            01/01/70 00:00      
            Hopefully not...            01/01/70 00:00      
               Revenge            01/01/70 00:00      
         Danger ahead?            01/01/70 00:00      
            Danger Indeed!            01/01/70 00:00      
            Always alternatives            01/01/70 00:00      
               ongoing 8051 compiler development            01/01/70 00:00      
                  There's the answer            01/01/70 00:00      
                     That´s not the answer            01/01/70 00:00      
                        re: not the answer?            01/01/70 00:00      
                           You unfaithful ;-)            01/01/70 00:00      
                              Compiler improvements            01/01/70 00:00      
                                 IDE, sim improvement            01/01/70 00:00      
                                    non-sequitur            01/01/70 00:00      
                                       Yes that was a jump            01/01/70 00:00      
                                          IDE            01/01/70 00:00      
                     The answer is simpler than that            01/01/70 00:00      
                        What a pessimist...            01/01/70 00:00      
                        Be prepared for....            01/01/70 00:00      
                           this is not even a 5 on the ricter scale            01/01/70 00:00      
                        Is ARM always a better choice?            01/01/70 00:00      
                           Keil's website down?            01/01/70 00:00      
                              it was, but isn't            01/01/70 00:00      
                           Windfall is happening?            01/01/70 00:00      
                              What me worry?            01/01/70 00:00      
                        I'm with you Kalpak            01/01/70 00:00      
                           possibly part of it            01/01/70 00:00      
                              But here it is the other way round            01/01/70 00:00      
                                 what about the IDEiots?            01/01/70 00:00      
                                    You have a point            01/01/70 00:00      
                           focus on HC08/12            01/01/70 00:00      
                              Exactly my point            01/01/70 00:00      
                        A similar view expressed on a newsgroup            01/01/70 00:00      
                           You have got to be kidding            01/01/70 00:00      
                              Then again            01/01/70 00:00      
                                 ok, but compared to what?            01/01/70 00:00      
                                 Excellent link            01/01/70 00:00      
                                    Agreed            01/01/70 00:00      
                                       EEMBC            01/01/70 00:00      
                                          8052.com            01/01/70 00:00      
                              why Dhrystones?            01/01/70 00:00      
                           8051 is unique?            01/01/70 00:00      
                           plus ca change...            01/01/70 00:00      
                           3 types of tools            01/01/70 00:00      
      Doesn't affect me in the slightest            01/01/70 00:00      
         What's special about software tools?            01/01/70 00:00      
            Fixable            01/01/70 00:00      
               Why?            01/01/70 00:00      
                  My Caprice is 19 years old            01/01/70 00:00      
                  Open source motoring            01/01/70 00:00      
            Cute little cat!            01/01/70 00:00      
               Cost/benefit            01/01/70 00:00      
                  Quick comparison: SDCC vs Keil            01/01/70 00:00      
                     willing to share ?            01/01/70 00:00      
                        I would but...            01/01/70 00:00      
                  that's the skinny            01/01/70 00:00      
         Beside the point            01/01/70 00:00      
   ARM buys Keil!            01/01/70 00:00      
      why would that happen?            01/01/70 00:00      
      Well hardly            01/01/70 00:00      
      That's highly unlikely!            01/01/70 00:00      
   Digression: Status of 8051 IP?            01/01/70 00:00      
      roll-your-own            01/01/70 00:00      
         ARM may be targetting MCU maket            01/01/70 00:00      
            They said it before            01/01/70 00:00      
            replacing the 8051            01/01/70 00:00      
      8051 IP - Public Domain?            01/01/70 00:00      
   8051 News            01/01/70 00:00      
      News submission broken            01/01/70 00:00      
         The Reason            01/01/70 00:00      
         lucky you            01/01/70 00:00      
         clock problem            01/01/70 00:00      
   How is Leading 51 seriesMCU vendor?            01/01/70 00:00      
      comments            01/01/70 00:00      
      Tools            01/01/70 00:00      
   just thought of it            01/01/70 00:00      
      just noted            01/01/70 00:00      
         Which ad?            01/01/70 00:00      
            the one I did not see            01/01/70 00:00      
               Display cycle            01/01/70 00:00      
            assurances ...            01/01/70 00:00      
               Keil and ARM            01/01/70 00:00      
                  What we've been saying            01/01/70 00:00      
                     cheaper, yes            01/01/70 00:00      
      Deals            01/01/70 00:00      
   a solution            01/01/70 00:00      
      You can keep the IDE            01/01/70 00:00      

Back to Subject List