[Ada Information Clearinghouse]

Ada '83 Quality and Style:

Guidelines for Professional Programmers

Copyright 1989, 1991,1992 Software Productivity Consortium, Inc., Herndon, Virginia.

CHAPTER 9: Performance

In many ways, performance is at odds with maintainability and portability. To achieve improved speed or memory usage, the most clear algorithm sometimes gives way to confusing code. To exploit special purpose hardware or operating system services, nonportable implementation dependencies are introduced. When concerned about performance, you must decide how well each algorithm meets its performance and maintainability requirements.

Apply these guidelines after an application is working correctly. Don't become obsessed with improving performance when the application already meets its performance requirements. Modifying code to improve performance can introduce errors--so the benefits of tweaking an algorithm should be real and clearly outweigh the risk.

These guidelines should be applied after you know your compiler and target environment. Benchmarks and compiler generated assembly code can be evaluated to help instantiate these guidelines for your development environment.

In this chapter...

9.1 Improving Execution Speed
9.1.1 Pragma Inline
9.1.2 Blocks
9.1.3 Arrays
9.1.4 Mod and Rem Operators
9.1.5 Constraint Checking

improving execution speed

Back to document index