比较c++和C程序的分支特性和分支预测器性能

D. Tang, A.M.G. Maynard, L. John
{"title":"比较c++和C程序的分支特性和分支预测器性能","authors":"D. Tang, A.M.G. Maynard, L. John","doi":"10.1109/PCCC.1999.749449","DOIUrl":null,"url":null,"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++.","PeriodicalId":442628,"journal":{"name":"IEEE International Performance, Computing, and Communications Conference","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"6","resultStr":"{\"title\":\"Contrasting branch characteristics and branch predictor performance of C++ and C programs\",\"authors\":\"D. Tang, A.M.G. Maynard, L. John\",\"doi\":\"10.1109/PCCC.1999.749449\",\"DOIUrl\":null,\"url\":null,\"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++.\",\"PeriodicalId\":442628,\"journal\":{\"name\":\"IEEE International Performance, Computing, and Communications Conference\",\"volume\":\"19 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1900-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"6\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IEEE International Performance, Computing, and Communications Conference\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/PCCC.1999.749449\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE International Performance, Computing, and Communications Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/PCCC.1999.749449","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 6

摘要

在当今的超标量和超流水线计算机中,分支指令是限制处理器以峰值速率发出指令的主要罪魁祸首。尽管c++是一种面向对象的编程语言,提供了很大的灵活性来帮助解决复杂的编程问题,但与C相比,代价是性能上的损失。本文比较了c++和C基准的内在分支行为和基本分支特征,并将这些特征与分支预测器的性能相关联。这项研究对c++和C基准测试在分支行为方面的差异产生了有趣的见解。分支的基本特征表明,c++程序在分支指令的目标上比C基准测试有更多的不一致性。对不同的分支预测方案进行了测试,结果表明,尽管在c++和C中可以以相似的预测精度预测分支是否被取走,但当考虑分支目标缓冲区(BTB)时,目标不一致性使c++中的目标预测变得更加困难。改进BTB以更好地适应不一致的c++目标,可以减少由于c++的特定编程风格和实践而造成的损失。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Contrasting branch characteristics and branch predictor performance of C++ and C programs
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++.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信