Sonsivri

Electronics => Pic C Languages => Topic started by: Catcatcat on July 10, 2023, 11:19:36 11:19



Title: MPLABX - Compiler Advisor
Post by: Catcatcat on July 10, 2023, 11:19:36 11:19
MPLABX has this function "Compiler Advisor" its purpose is to show how efficiently the program code will be created by the compiler, in different modes of its optimization.
I decided to analyze the operation of this function, well, such an analysis is done when there is really nothing to do, and now I really have nothing to do, I am looking for an interesting new job. :D
I changed the optimization mode, performed compilation and for the current mode I ran "Compiler advisor".
Here's what I got.
By the size of the data in memory, it lies stably in all modes. But with the size of the program, somewhere it matches, somewhere it doesn’t, but it always writes that if you buy the PRO version, it will be even cooler.
Has anyone else tested this way? I want to know this – "Compiler Advisor" specifically lies or does it show correctly?

no optimization

(https://i.ibb.co/RP2n62W/Screenshot-7.jpg)

O3 optimization

(https://i.ibb.co/3ySsxgR/Screenshot-4.jpg)

O2 optimization

(https://i.ibb.co/q1XrypZ/Screenshot-5.jpg)

O1 optimization

(https://i.ibb.co/yqDtNsf/Screenshot-6.jpg)

Os optimization

(https://i.ibb.co/wwm1bX4/Screenshot-8.jpg)

In principle, all the results suit me, but what if it could be better!? :o






Title: Re: MPLABX - Compiler Advisor
Post by: Manuel on July 10, 2023, 11:47:37 11:47
The PRO Comparison provide me ERROR so it's excluded from the graph automatically ...

X!


Title: Re: MPLABX - Compiler Advisor
Post by: Catcatcat on July 10, 2023, 01:40:00 13:40
Fooling us, Microchip, fooling us. ;D :D


Title: Re: MPLABX - Compiler Advisor
Post by: alien on July 10, 2023, 05:37:21 17:37
Suggestion/off topic : If you are really after tight/optimized  code then please try CC5x, no compiler can beat the CC5x optimizations .


Title: Re: MPLABX - Compiler Advisor
Post by: Catcatcat on July 11, 2023, 06:57:39 06:57
Everything suits me in microchip compilers, I was just interested in this function, the meaning of which boiled down to one thing - "pay for the license." But I live in such a country that I have no time for a license, and especially now. :D ;D


Title: Re: MPLABX - Compiler Advisor
Post by: patchjack on July 11, 2023, 10:11:47 10:11
I also found that its statistics are inaccurate, which is completely consistent with the hex file.