ILE C/C++ Programmer's Guide


Creating Classes to Improve Performance


C++ language only
When you use class libraries to create classes, use a high level of abstraction. After you establish the type of access to your class, you can create more specific implementations. This can result in improved performance with minimal code changes.

When you define structures or data members within a class, define the largest data types first to align them on the largest natural boundary. Define pointers first to reduce the padding necessary to align them on quadword (16-byte) boundaries. Follow them, in order, with the double-word, and half-word items to avoid padding or improve load/store time.


[ Top of Page | Previous Page | Next Page | Table of Contents ]