Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Itanium-based Systems: HP aC++/HP ANSI C Release Notes > Chapter 2 What’s New in This Version

-AA -D_HP_NONSTD_FAST_IOSTREAM Performance Improvement Macro

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

A new performance improvement preprocessor macro, _HP_NONSTD_FAST_IOSTREAM can be used to improve -AA iostream performance.

This macro enables the following non-standard features:

  • Sets std::ios_base::sync_with_stdio(false), which disables the default synchronization with stdio.

  • Sets std::cin.tie(0), which unties the cin from other streams.

  • Replaces all occurrences of "std::endl" with "\n".

Enabling this macro might result in noticeable performance improvement if the application uses iostreams often.

NOTE: Do not enable the macro in any of the following cases:
  • If the application assumes a C++ stream to be in sync with a C stream.

  • If the application depends on stream flushing behavior with endl.

  • If the user uses "std::cout.unsetf(ios::unitbuf)" to unit buffer the output stream.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2006 Hewlett-Packard Development Company, L.P.