29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Compiler</strong> Features<br />

4.31 Per<strong>for</strong>mance issues with PreCompiled Header (PCH) files<br />

Typically, <strong>the</strong> overhead of creating and reading a PCH file is small, even <strong>for</strong> reasonably large<br />

header files. If <strong>the</strong> PCH file is used, <strong>the</strong>re is typically a significant decrease in compilation time.<br />

However, PCH files can range in size from about 250KB to several megabytes or more, so you<br />

might not want to create many PCH files.<br />

PCH processing might not always be appropriate, <strong>for</strong> example, where you have an arbitrary set<br />

of files with non-uni<strong>for</strong>m initial sequences of preprocessing directives.<br />

The benefits of PCH processing occur when several source files can share <strong>the</strong> same PCH file.<br />

The more sharing, <strong>the</strong> less disk space is consumed. Sharing minimizes <strong>the</strong> disadvantage of large<br />

PCH files, without giving up <strong>the</strong> advantage of a significant decrease in compilation times.<br />

There<strong>for</strong>e, to take full advantage of header file precompilation, you might have to re-order <strong>the</strong><br />

#include sections of your source files, or group #include directives within a commonly used<br />

header file.<br />

Different environments and different projects might have differing requirements. Be aware,<br />

however, that making <strong>the</strong> best use of PCH support might require some experimentation and<br />

probably some minor changes to source code.<br />

4.31.1 See also<br />

Concepts<br />

• PreCompiled Header (PCH) files on page 4-29.<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 4-40<br />

ID061811<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!