Compiler performance

Beta Testing discussion on mikroC PRO for PIC.
Post Reply
Author
Message
Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

Compiler performance

#1 Post by Mince-n-Tatties » 04 Mar 2009 15:42

Quick compiler test

code used ADC_ON_LEDs.c from pro version directory

to make the code quickly compatible between Pro & STD compilers i removed the lines...

C1ON_bit = 0;
C2ON_bit = 0;

Device used 16F887 44pin TQFP
ROM available = 8192 Bytes
RAM available = 368 Bytes
EEprom available = 256 Bytes
Internal RC used. setting = 8Mhz NOCLKOUT

Performance stats taken from the main front screens (not the detailed stats page) of both Standard and Pro compilers are as follows

============================================

Standard Compiler

ROM Used = 86 Bytes
ROM Free = 8105 Bytes

ROM numbers do not add up correctly 86 + 8105 = 8191, 1 Byte short!

RAM Used = 19 Bytes
RAM Free = 349 Bytes

RAM numbers do add up correctly 19 + 349 = 368 Bytes

Hex file size = 574 Bytes

============================================

Pro Compiler

ROM Used = 85 Bytes
ROM Free = 8107 Bytes

ROM numbers do add up correctly 85 + 8107 = 8192 Bytes

RAM Used = 6 Bytes
RAM Free = 346 Bytes

RAM numbers do not add up correctly 6 + 346 = 352 Bytes, where are the missing 16 Bytes? are they assigned to R0 - R15?

Hex file size = 563 Bytes

============================================

in summary

the front page of the package reporting shows the Pro compiler has out performed the Standard compiler in all areas. With reduced ROM, RAM and hex output code usage

However a slightly closer look does not support the front page reporting numbers.

Also with the example compiled the Pro detailed RAM stats page usage pie chart shows there to be 495 Bytes of RAM available in a device which has 368 Bytes!

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

Re: Compiler py erformance

#2 Post by rajkovic » 04 Mar 2009 18:23

Mince-n-Tatties wrote:Quick compiler test
the missing 16 Bytes? are they assigned to R0 - R15?
in PRO compiler this 16 bytes are distinct section because:
Remapping local variables to working register optimization is introduced.
so they can not be reported as used ram because they may be shared with locals when optimizer see it is possible.
this is stated in whats new.
However a slightly closer look does not support the front page reporting numbers.
hex file is not 1 to 1 with flash image. Used ROM is what counts.
just for experiment org main to 0x400 and see results for hex size in old
and PRO compiler. you will see that rom is same but hex file size will be different completely.


Also with the example compiled the Pro detailed RAM stats page usage pie chart shows there to be 495 Bytes of RAM available in a device which has 368 Bytes!
this is bug, thanks for reporting. we will fix it.

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

#3 Post by Mince-n-Tatties » 04 Mar 2009 19:25

thanks for the feedback on my input, its great to have this rather than the way many more expensive compiler producers provide oneway traffic, customer in!

glad to give some time back to you guys and feel free to answer me with RTFM if its in there.

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#4 Post by rajkovic » 05 Mar 2009 12:55

Mince-n-Tatties wrote:thanks for the feedback on my input, its great to have this rather than the way many more expensive compiler producers provide oneway traffic, customer in!

glad to give some time back to you guys and feel free to answer me with RTFM if its in there.
We are always glad to have feedback, because it help us keep development in right direction. Thank you for helping us improve mikroC.

Post Reply

Return to “mikroC PRO for PIC Beta Testing”