Optimizing C++

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

[edit] Preface

[edit] Audience

This book is for intermediate C++ programmers (i.e. studying C++ for at least one year) who want to improve the performance of the software they develop.

[edit] Subject

This book contains guidelines and advices to write efficient software using the C++ language. Software correctness and maintainability is taken into account, but it is not the primary concern of such guidelines.

Most guidelines are not platform specific, and so are applicable to every processor, to every compiler, and to every operating system; the few platform specific advices try to cover most platforms.

[edit] Table of Contents

Cover
  1. Introduction
  2. Optimization life cycle
  3. Writing efficient code
    1. Performance improving features
    2. Performance worsening features
    3. Constructions and destructions
    4. Allocations and deallocations
    5. Memory access
    6. Thread usage
  4. General optimization techniques
    1. Input/Output
    2. Memoization
    3. Sorting
    4. Other techniques
  5. Code optimization
    1. Allocations and deallocations
    2. Run-time support
    3. Instruction count
    4. Constructions and destructions
    5. Pipeline
    6. Memory access
    7. Faster operations

Guidelines for editors

[edit] Further Reading

In other languages