The reason I did the comparison back in '95 was that I had been using CC5X 1.0 and needed support for the new 4K devices which CC5X didn't support until ver 2.0. I did a serous try using MPC, but it was very unstable and in my application it generated about 45% more code compared to CC5X. Luckily CC5X 2.0 came out sooner than expected and solved all my problems. The main reason why MPC produced so much extra code was that it didn't optimize code/bank bits at all. (The bits were always set/cleared before any function/variable was used.) Also, simple things like if(x>=5) resulted in two tests instead of comparing "if greater than 4"!!! It didn't reuse variable space either. In my application it meant that code generated by MPC needed three times as much RAM-space! Have these problems been solved in the latest version of MPC? -AW -----Original Message----- From: Tjaart van der Walt [SMTP:tjaart@WASP.CO.ZA] Sent: Monday, June 07, 1999 12:03 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: "New" optimizing PIC C-compiler: Anders Widgren wrote: > > >Anders made sweeping claims. I would also like to see an example of his research findings. > >So, how about it, Anders? Let's have a look and see... > >Friendly Regards /"\ > >Tjaart van der Walt X ASCII RIBBON CAMPAIGN > > The last time I did a more serious comparison between PIC C-compilers was in 1995. The problem was to come up with code that would work under several of these rather simple C-compilers. It would be much more interesting to use code from an actual "typical" project. I might do something like that during the summer. The code below compiled by CC5X for a 16C67 device resulted in 238 instructions and 13 RAM bytes. How much code does your compiler generate for the same code? Of course, in a real project I would probably use a look-up table instead of a case structure. (CC5X has a skip() instructions that automatically generates checked look-up tables.) I am hoping someone else will run this through MPC. I haven't the time. It will be interesting.... -- Friendly Regards /"\ \ / Tjaart van der Walt X ASCII RIBBON CAMPAIGN mailto:tjaart@wasp.co.za / \ AGAINST HTML MAIL |--------------------------------------------------| | Cellpoint Systems SA http://www.cellpt.com | |--------------------------------------------------| | http://www.wasp.co.za/~tjaart/index.html | | WGS84 : -26.0124 +28.1129 | | Voice : +27 (0)11 2545100 | |--------------------------------------------------| ·