Page 1 of 1

Memory use compare Flowcode 6 and 7

Posted: Tue Aug 23, 2016 8:41 pm
by Jan Lichtenbelt
The same program in Flowcode 6 uses:
RAM available:1024 bytes, used:192 bytes (18.8%), free:832 bytes (81.2%),
Heap size:320 bytes, Heap max single alloc:79 bytes
ROM available:8192 words, used:7778 words (95.0%), free:414 words (5.0%)
and in Flowcode 7:
Program space used 1843h ( 6211) of 2000h words ( 75.8%)
Data space used BFh ( 191) of 400h bytes ( 18.7%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Data stack space used 0h ( 0) of 33Ch bytes ( 0.0%)
Configuration bits used 2h ( 2) of 2h words (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)
How do I compare them?

With kind regards

Jan Lichtenbelt

Re: Memory use compare Flowcode 6 and 7

Posted: Tue Aug 23, 2016 9:14 pm
by QMESAR
I am no expert and just comparing your numbers

FC6
RAM available 1024 used 192 18.8%
ROM available 8192 used 7778 95%

FC7

RAM available 1024 used 191 18.7%
ROM(program space) available 8192 used 6211 75%

FC 7 in my opinion produced much better code as the program space used by FC7 in your case is 20% less than in FC6 the RAM is 1 byte better I guess this is because the number of variable you used are exactly the same so that should be more or less the same which is the case , I guess.

Are you using a lot of math in this code ? as I know that the XC8 is strong on performance on maths

Would be interesting to hear from Ben and Team their opinion

Re: Memory use compare Flowcode 6 and 7

Posted: Wed Aug 24, 2016 11:46 am
by Benj
Hello,

Yes I agree with QMESAR,

These are the two main things your interested in,

Code: Select all

ROM available:8192 words, used:7778 words (95.0%), free:414 words (5.0%) == Program space used 1843h ( 6211) of 2000h words ( 75.8%)

Code: Select all

RAM available:1024 bytes, used:192 bytes (18.8%), free:832 bytes (81.2%) == Data space used BFh ( 191) of 400h bytes ( 18.7%)
In your specific case it looks like Flowcode v7 is 20.14% more efficient in ROM usage and 0.53% more efficient in RAM usage.

Re: Memory use compare Flowcode 6 and 7

Posted: Wed Aug 24, 2016 5:20 pm
by johnsondav
Hi

Just out of interest. It would appear that, when FC7 allocates resources during compiling your program using the Microchip XC8 compiler, I have noticed resources seem to be prioritised towards the use of RAM. I am no expert, but that may be the reason I am seeing a speed increase during program execution. Just a thought! :-)

Dave

Re: Memory use compare Flowcode 6 and 7

Posted: Wed Aug 24, 2016 6:07 pm
by QMESAR
johnsondav wrote: I have noticed resources seem to be prioritised towards the use of RAM
Thank you for sharing this ,I need to check it out :D

I really do think Flowcode has a bright future by using the XC compilers, We all know that new devices are always the cheapest devices to develop with the older a device the more expensive they get and I think this XC addition will help Matrix to speed also up the inclusion of new device support in FC,

I am very positive about FC 7 :D