Fixes are available
November 2011 PTF for XL C/C++ for AIX, V11.1
January 2012 PTF for XL C for AIX, V11.1
January 2012 PTF for XL C/C++ for AIX, V11.1
April 2012 PTF for XL C for AIX, V11.1
April 2012 PTF for XL C/C++ for AIX, V11.1
July 2012 PTF for XL C/C++ for AIX, V11.1
October 2012 PTF for XL C/C++ for AIX, V11.1
October 2012 PTF for XL C for AIX, V11.1
February 2013 PTF for XL C for AIX, V11.1
February 2013 PTF for XL C/C++ for AIX, V11.1
XL C/C++ for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL C for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C for AIX Fix Pack 24 (September 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.1
November 2011 PTF for XL C for AIX, V11.1
July 2012 PTF for XL C for AIX, V11.1
XL C for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 22 (September 2015 PTF) for 11.1
APAR status
Closed as new function.
Error description
ANSI C function isnan() is not inlined, which provides sub-optimal performance. If isnan() is inlined, it will provide better performance when software uses NaN values as a "missing value" indicator needs a fast check for "missing values". Use the test case to see the sub-optimal performance of the current non-inlined isnan(). Can xlc inline isnan() to provide the performance and convenience? ===== TESTCASE: $cat slowisnan.c #include <stdio.h> #include <math.h> int myisnan(double x) { #ifdef FASTWAY return (x) != (x); #else return isnan(x); #endif } int main() { int i, s; s = 0; for (i = 0; i < 100*1000*1000; i++) s += myisnan(1.2); printf("%d\n", s); return 0; } ===== WORKAROUND: use own function/macro. ===== ACTUAL OUTPUT: On P6: * xlc -O slowisnan.c -lm && timex ./a.out * user 0m1.16s * * xlc -O -DFASTWAY slowisnan.c -lm && timex ./a.out * user 0m0.48
Local fix
use own function/macro.
Problem summary
PROBLEM DESCRIPTION: Certain functions (such as isnan and isinf) in the math library are not inlined, even if they are very small. The overhead of the function call causes them to take twice as long as they need to in run time performance. USERS AFFECTED: Users who call these routines many times in hot areas of the code.
Problem conclusion
The compiler will now inline isnan and isinf.
Temporary fix
Comments
APAR Information
APAR number
IV07277
Reported component name
XL C/C++ AIX
Reported component ID
5724X1300
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-09-02
Closed date
2011-11-02
Last modified date
2011-11-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C FOR AIX
Fixed component ID
5724X1200
Applicable component levels
Document Information
Modified date:
28 September 2021