Welcome!
cool Welcome PIC fans!
(to Pascal language fans too!)
Technical

Close General documentation

Close How to support PMP

Close Manuals

Close Tips

Other stuff

Close Documentation

Close How to support PMP

Close Off Topic

Close Today's favourites

Search




Downloads
Diaporama

Documentation

Google

Tips - Optimizing variables

Remember that 8 bits PICs are optimized for unsigned BYTES smile so you should apply these rules:

  • Use BYTE variables unless you really need a bigger size.
  • Use WORD variables unless you really need signed integers. Signed integers cost is greater than unsigned integers, both in code size and execution time.

PMP booleans are BIT variables and they are very effective, so use booleans for all logical operations.
Boolean arrays are also supported by PMP, but very code and time consuming. Use them only for big arrays if you cannot do otherwise.

Finally, remember that in non-strict mode PMP is doing implicit casts in expressions, without warning (unless there is a possible truncation), so be careful in using mixed size terms in expressions, it may be very code size and time consuming.


Creation date : 2008.12.23 5:11 PM
Last update : 2013.08.05 11:24 AM
Category : Tips
Page read 6530 times


Print the article Print the article


react.gifReactions to this article

Nobody gave a comment yet.
Be the first to do so!


Connection...
 Members List Members : 149

Your Username:

Password:

[ Password lost ? ]


[ Join us ]


Member online :  Member online :
Anonymous online :  Anonymous online : 4

Total visits Total visits: 560416  

Most ever online
Most ever onlineTotal : 75

The 06/09/2013 @ 08:37


Webmaster - Infos

Ip: 54.198.224.121

Search




Friends News
Where are you from?

Sentence to think about :  If you don't know what your program is supposed to do, you'd better not start writing it.  Dijkstra's law
^ Top ^