There is free a C compiler for PIC18 but it doesn't do any sort of optimisation and it is very strict in how it likes you to write code - if you want a compiler which optimises the code you have to pay Microchip many hundreds of pounds. The one thing I have found when working with PICs is that there software is so intermittent in whether or not it works.

Also, I've used Microchip free MPLAB and the free C compiler for the PIC24 chips, and MPLABis much more difficult to get setup properly than the Arduino IDE, and sometimes you go around in circles trying to figure out certain things, like how the darn directories and path connections work. Much higher learning curve.

Also, with MPLAB you usually need a chip programmer like the PICKIT2, whereas Arduinos all come pre-programmed with bootloaders so you don't need a programmer.

Also, with Arduino, you have many functions, like I2C, SPI, Serial, on and on, already written,whereas you have to do all that stuff yourself for PICs. There are some libraries for the PICs around, but I found them to be almost inscrutable to try and use.

To put it into historical perspective, Arduinos are as easy to use as the original Parallax BasicStamps, whereas using PICs is more like buying the raw chips Parallax used to make the Stamps, and you pretty much have to do everything yourself.

I started playing with micro controllers about one year ago. I originally planned to buy a couple of pic chips. Until I took a good look at the software/libraries available and compared it to Arduino. The learning curve for pics is a lot steeper. I'm sticking to Arduino/AVR, if you outgrow the Arduino IDE you can always use your favourite editor and use gcc-avr to compile your programs. This very forum also played a big role. I know there is always someone willing to help when I get stuck. I have learned a lot just by reading the programming section.

I shouldn't think GCC itself would have many optimizations, as those are usually added on for the specific chip architectures the compiler is running on. So maybe the AVR GCC people added them on.

I believe the Microchip C compilers are also based upon GCC, so they give away the non-optimizedversions, but they charge a lot for the versions they optimized in house for their own chips. Butthis may all be scuttle-butt too.

All in all, however, for most applications, I doubt that most people really need to worry about this.

I'm sticking to Arduino/AVR, if you outgrow the Arduino IDE you can always use your favourite editor and use gcc-avr to compile your programs.

The other thing about Arduino is, there is an easy pathway when you need more processing power, with boards like the DUE and misc 3rd party boards that use 32-bit processors, but which still use the Arduino environment.