Performance
Automatic instantiation adds compilation/link time.
There are two ways of avoiding this overhead, at the cost of more
explicit user intervention:
-
Use one of the manual instantiation schemes described earlier.
Typically you would identify which template classes were used by a
program and then create a specific source file to contain the
instantiations.
-
Identify instantiations that are needed for a project and do them up
front, then put the resulting objects into an archive library for use by
the project.
Remember that the automatic instantiation process is driven by
unresolved external symbols, and provision of the needed
instantiations preempts any need for automatic instantiation.
Next topic:
What can go wrong
Previous topic:
Dependency management
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005