C/C++ Programmer's Guide (G06.25+)
Compiling, Binding, and Accelerating TNS C 
Programs
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
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 information, refer to 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.
3. Run the Accelerator. On G-series systems, you do this with the AXCEL command. 
On H-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.
To save time in accelerating your programs, to produce the smallest possible 
accelerated object files, and to ensure that the Accelerator or OCA produces the most 
efficient code, do the following:
•
Use C function prototypes for all of your C routines.
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










