Fixes are available
May 2011 PTF for XL C/C++ for AIX, V11.1
August 2011 PTF for XL C/C++ for AIX, V11.1
November 2011 PTF for XL C/C++ for AIX, V11.1
January 2012 PTF for XL C/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
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/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/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/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/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.1
APAR status
Closed as program error.
Error description
A significant performance difference is observed when compiling the following test case with xlC vs. g++. ===== Test case: main.cpp: #include <iostream> #include <fstream> int main( int argc, char** argv ) { int vueltas = 1; if ( argc == 2 ) vueltas = atoi( argv[1] ); while ( --vueltas >= 0 ) { std::ifstream ifs( "File.txt" ); if ( ifs.is_open() ) { while ( !ifs.eof() ) { char buf[200]; ifs.getline( buf, sizeof( buf ) ); // std::cout << buf << std::endl; } ifs.close(); } } } File.txt: Online file 1 Online file 2 Online file 3 Online file 4 Online file 5 Online file 6 Online file 7 Online file 8 Online file 9 Online file 10 ===================== ===== Performance: The following performance numbers are observed when the text file 'File.txt' is opened, read and closed 2 million times. g++: real 0m14.463s user 0m4.771s sys 0m9.096s xlC: real 3m46.124s user 2m47.589s sys 0m30.686s
Local fix
Use the fstream.h and iostream.h headers, instead of the fstream and iostream header files.
Problem summary
USERS AFFECTED: Users who create lots of 'fstream' objects can be affected by this issue. PROBLEM DESCRIPTION: A performance hit is encountered due to the unnecessary creation of locale objects.
Problem conclusion
The issue has been fixed by making the duplicate locale objects the same.
Temporary fix
Comments
APAR Information
APAR number
IZ96364
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-03-08
Closed date
2011-03-09
Last modified date
2011-03-09
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/C++ AIX
Fixed component ID
5724X1300
Applicable component levels
RB10 PSY
UP
Document Information
Modified date:
09 March 2011