Consultancy and Total Solutions Training Provider for Embedded Systems, Electronics and Electrical Engineering, Programming, Computing, Operations, ISO9000, ISO14000 and Management.

Bridging the Gap

Training Courses

Advanced Optimisation Techniques for C

Course id: 0070


C is the programming language of choice for the vast majority of embedded applications, and will be the dominant language for the foreseeable future with the increasing demand for ever sophisticated, miniature and intelligent appliances.

This course is specifically tailored for engineers intending to optimised their C code for maximum performance. The topics covered are suitable for a wide range of system from resource constrained microcontroller-based systems to computers. The techniques discussed are equally applicable to C++, and a section is dedicated to it.

Course highlight
Participants will be able to optimise their own code as part of the course.

What participants say about the course
The following are some verbatim statements from the participants:

  • Improved my programming skills -- Nov 2014
  • This course is meet our expectation -- Nov 2014

What you will learn

This course concentrates on the theoretical and practical knowledge to allow participants to achieve the following learning outcomes. Upon completing the course, participants would be able to:
  • Identify and mitigate bottlenecks in algorithms
  • Use efficient data types and employ efficient operators
  • Efficiently pass parameters to functions
  • Reduce computation overheads of array and structure access
  • Unroll loops for increased performance

Who should attend

This course is particularly suited for design engineers, application engineers, software engineers and programmer responsible for optimising systems.


Participants must have C programming experience and know the basic architecture of computing systems (processor, memory, fetch, execution).

Course methodology

This course is presented in a workshop style with example-led lectures interlaced with hands-on practical for maximum understanding. Participants would be able to optimise their code under the guidance of the instructor.

Course duration

2 days.

Course structure

  • The C Compiler
    • Overview of optimization
    • The compilation process
    • Compiler optimization techniques
    • Code profiling
    • Hands-on practical: Code Profiling
  • Equation Optimisation
    • Constant folding
    • Strength reduction
    • Using look-up tables
    • Hands-on practical: Optimising Algorithms
  • Computation Efficiency
    • Data types and memory alignment
    • Storage scope
    • Hands-on practical: Data Types and Scope
    • Prefix and postfix operators
    • Bitwise operations
    • Hands-on practical: Operator Optimisation
    • Floating point and integer conversion
    • Integer computation for real numbers
    • Hands-on practical: Numerical Type
  • Functions
    • Efficient parameter passing
    • Function inlining
    • Recursive functions
    • Hands-on practical: Function Efficiency
  • Memory Efficiency
    • Array index computation
    • Cache effect on array access
    • Hands-on practical: Efficient Array Access
    • Structure storage and access
    • Complex structure access
    • Hands-on practical: Structure Efficiency
    • Dynamic memory allocation issues
  • Looping Constructs
    • Multithreaded execution
    • Loop unrolling
    • Hands-on practical: Loop Unrolling


Dr Royan Ong

Course Schedule





News on ProvenPac

  ProvenPac Sdn. Bhd.
  C-4-3 Gembira Park,
  Jalan Riang, 58200
  Kuala Lumpur, Malaysia

  Tel: +603 03 5889 5889

No public course
currently scheduled.


Please inform me when
this course is scheduled.


Please contact me to
arrange in-house training.