Banner08

Efficiency

Compiler Efficiency

The FED C Compiler (WIZ-C Professional and AVIDICY) are intended for maximum efficiency in code size and speed as the many MCU devices are limited in the amount of ROM provided. Some specific examples are shown below:

  • Efficient handling of char types. As the PIC and AVR MCU’s are 8 bit controllers, char types can be handled very efficiently. For example if x and y are global char types, then:

    x=0 compiles to one word
    x=y compiles to two words
    y=x++ compiles to three words

     
  • The linker places modules in memory to minimise inter-page and long jumps.
  • The FED C Compiler includes a software stack which may be used for local variables. However if it is possible then local variables are stored in temporary global memory space, the size of this area is controlled by the user. This can produce very significant savings in program execution time.

     
  • Functions may be called using the internal call stack if call depth is 6 or less (which is very efficient), or may use the software stack which allows far deeper calling and even recursive functions.

     
  • Wherever possible the W register for the PIC, or the register file for the AVR are used to hold intermediate results