c++中的效率

S. Lippman
{"title":"c++中的效率","authors":"S. Lippman","doi":"10.1109/TOOLS.1999.10009","DOIUrl":null,"url":null,"abstract":"Summary form only given, as follows. In this talk, we present a series of C++ programming design idioms for writing efficient C++ programs, briefly review the underlying C++ object model, and turn to design alternatives when the idioms themselves become overwhelmed with, say, large-scale object creation and copy. We look at object-based and object-oriented design, use of the STL container classes and generic algorithms, and the design alternatives of inheritance versus parameterization through use of the C++ template facility. This is a particularly effective area of program efficiency because (a) the idioms generally make for more readable programs, and (b) once the idioms and implementation (or object) model is internalized, these gains in efficiency come mostly for free - I like to think of them as low-hanging fruit. In the course of the tutorial, I¿ll point out areas where experienced C programmers tend to write correct but frightfully sluggish C++ code by contrasting C and C++ programming idioms.","PeriodicalId":434404,"journal":{"name":"Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 29 (Cat. No.PR00275)","volume":"89 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1999-06-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Efficiency in C++\",\"authors\":\"S. Lippman\",\"doi\":\"10.1109/TOOLS.1999.10009\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Summary form only given, as follows. In this talk, we present a series of C++ programming design idioms for writing efficient C++ programs, briefly review the underlying C++ object model, and turn to design alternatives when the idioms themselves become overwhelmed with, say, large-scale object creation and copy. We look at object-based and object-oriented design, use of the STL container classes and generic algorithms, and the design alternatives of inheritance versus parameterization through use of the C++ template facility. This is a particularly effective area of program efficiency because (a) the idioms generally make for more readable programs, and (b) once the idioms and implementation (or object) model is internalized, these gains in efficiency come mostly for free - I like to think of them as low-hanging fruit. In the course of the tutorial, I¿ll point out areas where experienced C programmers tend to write correct but frightfully sluggish C++ code by contrasting C and C++ programming idioms.\",\"PeriodicalId\":434404,\"journal\":{\"name\":\"Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 29 (Cat. No.PR00275)\",\"volume\":\"89 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1999-06-07\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 29 (Cat. No.PR00275)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/TOOLS.1999.10009\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 29 (Cat. No.PR00275)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/TOOLS.1999.10009","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

仅给出摘要形式,如下。在本次演讲中,我们将介绍一系列用于编写高效c++程序的c++编程设计习惯,简要回顾底层的c++对象模型,并在习惯本身因大规模对象创建和复制而不堪重负时转向设计替代方案。我们将介绍基于对象和面向对象的设计、STL容器类和泛型算法的使用,以及通过使用c++模板工具进行继承和参数化的设计选择。这是提高程序效率的一个特别有效的领域,因为(a)习惯用法通常使程序更具可读性,(b)一旦习惯用法和实现(或对象)模型内部化,这些效率的提高大多是免费的——我喜欢把它们看作是唾手可得的果实。在本教程的过程中,我将通过对比C和c++编程习惯,指出有经验的C程序员倾向于编写正确但非常缓慢的c++代码的地方。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Efficiency in C++
Summary form only given, as follows. In this talk, we present a series of C++ programming design idioms for writing efficient C++ programs, briefly review the underlying C++ object model, and turn to design alternatives when the idioms themselves become overwhelmed with, say, large-scale object creation and copy. We look at object-based and object-oriented design, use of the STL container classes and generic algorithms, and the design alternatives of inheritance versus parameterization through use of the C++ template facility. This is a particularly effective area of program efficiency because (a) the idioms generally make for more readable programs, and (b) once the idioms and implementation (or object) model is internalized, these gains in efficiency come mostly for free - I like to think of them as low-hanging fruit. In the course of the tutorial, I¿ll point out areas where experienced C programmers tend to write correct but frightfully sluggish C++ code by contrasting C and C++ programming idioms.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术文献互助群
群 号:604180095
Book学术官方微信