Summary

Often arithmetic functionality can be broken down into several smaller, simpler steps that are ideal candidates for optimization. These smaller steps are generally used repeatedly on large amounts of data, and most contain looped or recursive functionality, which is why high levels of gain can be had. Several optimization techniques can often be introduced in arithmetic functionality:

  • Rewriting recursive routines into iterative routines

  • Loop unrolling

  • Using data-specific knowledge (using bit arithmetic operations and so on)

  • Using lists of predetermined answers or intermediate results

  • Using optimized mathematical equations

Multitasking is either performing different tasks on different processors simultaneously (multiprocessor system) or switching ...

Get C++ Footprint and Performance Optimization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.