Measuring firmware performance
If you use MPLAB, simply simulate with the "Stopwatch" function. 

You can insert breakpoints and profile the code, accurate to the cycle. Very useful.

Of course you can look at the Memory Usage Gauge and see the code size when it's compiled. 

It's also useful to look at the disassembled code, as others have suggested, especially in tight ISRs.