HP aC++ Release Notes Version A.03.95 (5900-1789; September 2011)

HP aC++ Release Notes
New Features in Version A.03.70
Chapter 1 13
The _HP_NONSTD_FAST_IOSTREAM Performance Improvement Directive
HP aC++ A.03.70 has a new performance improvement preprocessor directive,
-D_HP_NONSTD_FAST_IOSTREAM, which improves the iostream performance. This directive enables the
following non-standard features:
•Sets ios_base::sync_with_stdio(false), which disables the default synchronization with
stdio.
•Sets std::cin.tie(0), which unties the cin from other streams.
Replaces all occurrences of "std::endl" with "\n".
Enabling this directive might result in noticeable performance improvement, if the application uses
iostreams more often.
NOTE Do not enable -D_HP_NONSTD_FAST_IOSTREAM directive in any of the following cases:
If the application assumes C++ stream to be in sync with C stream
If the application depends on stream flushing behavior with endl
If the user uses "cout.unsetf(ios::unitbuf)" to unit buffer the output stream.
The +rodata_array_init Option for Memory Efficient Initialization for Local Arrays
A new command-line option, +rodata_array_init is added in HP aC++ A.03.70 to enable memory
efficient initialization for local arrays.
When you use this option, the compiler allocates the local array initializers (that it generates for initialized
local arrays) to the read-only data section. By default, these initializers are allocated to the data section.
NOTE If the array is initialized with addresses, this option can cause an increase in run time. The
increase is based on the number of addresses in the array initializer and the number of times
the array is initialized. This overhead is normally negligible.
Option Mapping Support for Easy Migration
The option mapping support available in HP aC++ A.03.70 facilitates easy migration of build environment
from a different compiler to HP aC++. You can use the option mapping files to map the options in the third
party compilers to HP aC++ equivalents
Mapping File: