Previous Next Contents Index Doc Set Home


Performance Tuning (SPARC)

D


This appendix describes performance tuning on SPARC platforms.


Limits

Some parts of the C library cannot be optimized for speed, even though doing so would benefit most applications. Some examples:


libfast.a Library

The library libfast.a provides speed-tuned versions of standard C library functions. Because it is an optional library, it can use algorithms and data representations that may not be appropriate for the standard C library, even though they improve the performance of most applications.

Use profiling to determine whether the routines in the following checklist are important to the performance of your application, then use this checklist to decide whether libfast.a benefits the performance:

The important routines are: .mul, .div, .rem, .umul, .udiv, and .urem.

  • Do use libfast.a if performance of memory allocation is important, and the size of the most commonly allocated blocks is close to a power of two.

    The important routines are: malloc(), free(), realloc().

  • Do use libfast.a if performance of block move or fill routines is important.

    The important routines are: bcopy(), bzero(), memcpy(), memmove(), and memset().

  • Do not use libfast.a if the application requires user mode, memory-mapped access to an I/O device that does not support 64-bit memory operations.
  • Do not use libfast.a if the application is multithreaded.
  • When linking the application, add the option -lfast to the cc command used at link time. The cc command links the routines in libfast.a ahead of their counterparts in the standard C library.


    Previous Next Contents Index Doc Set Home