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-UX 64-bit Porting and Transition Guide: HP 9000 Computers > Chapter 3 HP-UX 64-bit Porting Concepts

HP-UX 64-bit Performance Considerations

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Most applications should remain as 32-bit applications on HP-UX 64-bit systems. However, some applications manipulate very large data sets and are constrained by the 4GB address space limit in 32-bit mode. These applications can take advantage of the larger address space and larger physical memory limits of 64-bit systems.

Some I/O bound applications can trade off memory for disk I/O. By restructuring I/O bound applications to map larger portions of data into memory on large physical memory machines, disk I/O can be reduced. This reduction in disk I/O can improve performance because disk I/O's are more time-consuming than memory access.

Memory-constrained applications, such as large digital circuit simulations, may also benefit by transitioning to 64-bit mode. Some simulations are so large that they cannot run without major code modifications in a 32-bit address space.

What Impacts Performance in 64-bit Applications

Typical applications do not require more virtual memory than what is available in 32-bit mode. When compiled in 32-bit mode on HP-UX 64-bit platforms, these applications usually perform better than when recompiled in 64-bit mode on the same 64-bit platform. Some of the reasons for this include:

  • 64-bit programs are larger. Depending on the application, the increase in the program size can increase cache and TLB misses and place greater demand on physical memory.

  • 64-bit long division is more time-consuming than 32-bit integer division.

  • 64-bit programs that use 32-bit signed integers as array indexes require additional instructions to perform sign extension each time an array is referenced.

  • By default, 64-bit object modules can be placed into shared and archive libraries and used in main programs. 32-bit code must be compiled with the +z or +Z option if it is used in shared libraries.

Tuning Your 64-bit Application

Here are some ways to improve the performance of your 64-bit application:

  • Avoid performing mixed 32-bit and 64-bit operations, such as adding a 32-bit data type to a 64-bit type. This operation requires the 32-bit type to be sign-extended to clear the upper 32 bits of the register.

  • Avoid 64-bit long division whenever possible.

  • Eliminate sign extension during array references. Change unsigned int, int and signed int variables used as array indexes to long variables.

  • Consider compiling with the +Onoextern option if your 64-bit object modules are not used in a shared library.

  • Consider compiling with the +ESfic and the +Onoextern options if your application is fully archive bound.

See the HP C Online Reference (cc +help) or the HP aC++ Online Programmer's Guide (aCC +help) for information on using +Onoextern and +ESfic.

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