Skip to main content

 
IBM Systems  > Servers  > Mainframe servers  > z/OS  > 

Using XPLINK to improve C/C++ program performance

  

dblue_rule.gif

by Dave Sudlik and Barbara Neumann

Do you want to reduce overhead for C and C++ function linkage in your programs? Using Extra Performance Linkage (XPLINK) with the OS/390® C/C++ compiler and Language Environment® for OS/390 V2R10 will help you do just that.

XPLINK is a new call linkage between programs that can significantly improve your program's performance when your environment contains frequent calls between small programs. XPLINK makes function calls as fast and efficient as possible by removing all nonessential instructions from the main path. Think of it as a performance power-pack to boost your program's processing time. (graphic of goose with power pack XPLINK)

Applications written in the C++ language tend to involve many small function calls. Also, modular applications written in C may also have high linkage overhead. XPLINK, by reducing linkage costs by up to 50%, can improve the performance of these applications. The performance improvement for a given application depends on how much time the it currently spends in function call overhead.

XPLINK significantly speeds up the linkage for C and C++ routines by using a stack that grows from high addresses to low addresses in memory (that is, a downward-growing stack) and by passing parameters in registers. It reduces the size of the program that is loaded into memory, allowing you to load more functions into memory. It supports reentrant and non-reentrant code and calls to functions in Dynamic Link Libraries (DLLs). When all functions are compiled with XPLINK, you can use function pointers without restrictions, which assists you in porting new applications to S/390. (graphic of stack frame diagram)

Compatibility between XPLINK and non-XPLINK programs is provided. This allows XPLINK programs to communicate with programs built with the standard linkage using, for example, a DLL call. In this mixed linkage environment, some of the performance gains of an XPLINK application may be offset by the cost of calling legacy programs until they are rebuilt using the new linkage conventions. The maximum performance improvement can be achieved by recompiling an entire application with XPLINK.

The DFSMS 1.6 Binder is used to produce XPLINK executables that must reside in a partitioned data set extension (PDSE) or the hierarchical file system (HFS).

XPLINK enhances the OS/390 platform for e-Commerce applications. XPLINK is available for applications running under OS/390 batch, TSO/E, and OS/390 UNIX System Services. You can also use IBM® Debug Tool or the OS/390 UNIX dbx debugger to debug applications that use the XPLINK linkage conventions.

While XPLINK can provide a significant performance enhancement to the right kind of application, it can also degrade the performance of an application that is not suitable for XPLINK. An instance of this is an application that is predominantly coded in COBOL or PL/I.