Software Optimization Guide for AMD64 Processors

25112 Rev. 3.06 September 2005

2.15Local Static Functions

Optimization

Declare as static functions that are not used outside the file where they are defined.

Application

This optimization applies to:

32-bit software

64-bit software

Rationale

Declaring a function as static forces internal linkage. Functions that are not declared as static default to external linkage, which may inhibit certain optimizations—for example, aggressive inlining—with some compilers.

34

C and C++ Source-Level Optimizations

Chapter 2

Page 50
Image 50
AMD 250 manual Local Static Functions, Optimization