Memory use compare Flowcode 6 and 7

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 796
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Contact:

Memory use compare Flowcode 6 and 7

Post 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

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Contact:

Re: Memory use compare Flowcode 6 and 7

Post 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

User avatar
Benj
Matrix Staff
Posts: 14848
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Memory use compare Flowcode 6 and 7

Post 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.

johnsondav
Posts: 186
Joined: Thu Jun 28, 2012 7:29 pm
Location: Durham
Contact:

Re: Memory use compare Flowcode 6 and 7

Post 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

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Contact:

Re: Memory use compare Flowcode 6 and 7

Post 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

Post Reply