C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiling, Binding, and Accelerating TNS C
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
14-11
Accelerating C Programs
Use the Binder INFO command with the DETAIL clause to show the ENV attribute of a
particular data or code block. For more details, see the Binder Manual.
Accelerating C Programs
The Accelerator enables you to increase the performance of programs that run on
TNS/R systems. The Object Code Accelerator (OCA) enables you to increase the
performance of programs that run on TNS/E systems.
The Accelerator or OCA optimizes TNS programs to take advantage of the native
architecture. Most TNS object code that has been accelerated runs faster on native
systems than TNS object code that has not been accelerated. Most programs written
for TNS systems do not require changes to run on native systems, either with or
without acceleration.
The Accelerator and OCA take as input an executable TNS object file and produce as
output an accelerated object file. The accelerated object file contains both the original
TNS code and the logically equivalent optimized native instructions—accelerated
object code.
The basic steps to accelerate a C program are:
1. Compile and bind the program.
2. Debug the program, if necessary.
3. Run the Accelerator. On NonStop S-series systems, you do this with the AXCEL
command. On NonStop NS-series systems, you use the OCA command.
If the Accelerator or OCA issues an error message, correct the error and run the
Accelerator or OCA again to produce an output file.
4. Run the NonStop SQL/MP compiler, if the program contains embedded NonStop
SQL/MP statements.
5. Perform final testing on the accelerated program.
Table 14-4. Run-Time Environment Resulting From Binding Modules
Binder Group
Binder
Group OLD COMMON NEUTRAL
OLD language-specific Not allowed language-specific
COMMON Not allowed CRE CRE
NEUTRAL language-specific CRE language-specific or CRE