• DocumentCode
    2609050
  • Title

    Contrasting branch characteristics and branch predictor performance of C++ and C programs

  • Author

    Tang, D.-C.D. ; Maynard, A.M.G. ; John, L.K.

  • Author_Institution
    Sun Microsyst., USA
  • fYear
    1999
  • fDate
    12-12 Feb. 1999
  • Firstpage
    275
  • Lastpage
    283
  • Abstract
    In today´s superscalar and superpipelined computers, branch instructions are the main culprits that limit the processor from issuing instructions at a peak rate. Although C++, which is an object-oriented programming language, provides great flexibility to help solve complex programming problems, the cost is a penalty in performance when compared to C. This paper compares the intrinsic branch behavior and basic branch characteristics of C++ and C benchmarks and correlates these characteristics to the performance of branch predictors. This study produced interesting insights into the differences between C++ and C benchmarks with respect to branch behavior. The basic branch characteristics showed that C++ programs have more inconsistency for the targets of branch instructions than C benchmarks. Various branch prediction schemes were tested, and the results show that although it is possible to predict whether a branch is taken or not taken with similar prediction accuracies in C++ and C, when branch target buffers (BTB) are considered, target inconsistency makes target prediction more difficult in C++. Improving the BTB to better accommodate the inconsistent Mature of C++ targets can reduce the penalty due to specific programming styles and practices of C++.
  • Keywords
    C language; C++ language; software performance evaluation; C; C++; benchmarks; branch behavior; branch characteristics; branch instructions; branch predictor performance; target inconsistency; Accuracy; Benchmark testing; Computer aided instruction; Costs; Educational institutions; Laboratories; Modems; Object oriented programming; Out of order; Sun;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Performance, Computing and Communications Conference, 1999 IEEE International
  • Conference_Location
    Scottsdale, AZ, USA
  • ISSN
    1097-2641
  • Print_ISBN
    0-7803-5258-0
  • Type

    conf

  • DOI
    10.1109/PCCC.1999.749449
  • Filename
    749449