Issue 1, 2015 |
Download pdf |
Leveraging IBM® facilities for greater performance
In TECHniques Issue 3, 2014, I introduced the newest version of Natural Optimizer Compiler that exploits the newest IBM z/Architecture® hardware. Our next release is just around the corner and here is what you can expect from the newest implementation.
Natural Optimizer Compiler 8.3.1
Software AG released Natural Optimizer Compiler 8.3.1 in April 2014 to leverage z/Architecture facilities up to architecture level 8. With the 8.3.1 release, you can use all IBM facilities supported to a z10™. Users who have applications with architecture level 8 of Natural Optimizer Compiler have experienced performance improvements of 10 to 15 percent.
If you operate a z Server at a lower level, simply check the Natural Optimizer Compiler documentation and set the ARCH option to the appropriate level. Software AG continues to provide and support Natural Optimizer Compiler 8.2 for those who don’t want to touch your existing applications and remain with version 8.2.
Natural Optimizer Compiler 8.3.2
We have continued to improve Natural Optimizer Compiler to give you greater performance. Version 8.3.2, scheduled to be released at the end of April 2015, adds support for architecture levels nine and 10 as well as major improvements in Unicode® and Decimal Floating Point (DFP).
Unicode improvements
While assignments of Unicode (U) type variables were optimized in Natural Optimizer Complier 8.3.1, general support of U type variables in version 8.3.2 now has one important condition: All Unicode character strings must be normalized.
We recognize that string operations with Unicode variables are much faster. Hence we are investigating improvements above 80 percent with EXAMINE FORWARD and above 60 percent with EXAMINE BACKWARD.
In general (without any ARCH options), we generate Assembler code in NOC 8.3.2 with the MOVE ALL and MOVE UNTIL statements using Unicode variables. Code generated from NOC 8.3.2 is more than 50 percent faster than the interpreter code from the Natural internal Unicode functions.
The greatest improvements we have seen with IF and DECIDE statements use Unicode variables. More than 90 percent of CPU time is saved leveraging the newest CLCLU instructions with version 8.3.2.
DFP improvements
IBM has implemented a new facility with the zEC12 and zBC12 machines called the Decimal Floating Point Zoned-Conversion Facility. Any kind of numeric variable conversion to the DFP format is very fast. Also, any arithmetic using DFP format executes much faster than standard numeric (packed) calculations.
Natural Optimizer Compiler takes advantage of these performance improvements and executes most of the numeric calculations internally in DFP format.
For example, compiling a simple Natural statement such as “ADD J to K giving L with numeric values” results in about 25 Assembler instructions in version 8.2. By using the new DFP capability in version 8.3.2, the calculation can be handled with only four instructions as shown below:
The new instructions used in this example are:
- CDZT: the convert from zoned instruction read data from memory convert it to a floating point format and store it into a floating point register
-
ADTR: add floating point registers
- CZDT: the convert to zoned instruction convert a DFP operand in a floating point register to EBCDIC data and stores it to a target memory location
Other arithmetic calculations are handled in a similar manner and run twice as fast as the prior implementation, which leads to CPU savings and thus cost savings.
Conclusion
If you are running your applications on the newest IBM z/Architecture hardware and want to leverage the facilities IBM now offers, move from Natural Optimizer Compiler 8.2 to 8.3 and set the appropriate ARCH options. If you are still running Natural applications without Natural Optimizer Compiler, contact your sales representative and arrange a proof-of-concept to see what type of benefits you can gain without impacting your production environment and without re-installing your Natural development environment.
It’s easy to hook the new Natural Optimizer Complier into your Natural development environment with just a parameter. You will be able to get it working in your environment within an hour.
Outlook
IBM recently released the new z13™ hardware with improved DFP functions for packed decimal called the Decimal-Floating-Point Packed-Conversion Facility. Now that the specifications are available, we have already started implementing the next version of Natural Optimize Compiler.
Look for an update in future TECHniques about you can expect from Natural Optimizer Compiler 8.3.3 in April 2016.
To take advantage of the new facilities available in Natural Optimize Compiler v8.3, just drop me an email and request our new Getting Started Guide. Learn how to leverage IBM facilities today, just email Wil Heynen.