标题: 个体导向程式架构及机能在不同C++编译器下之执行效率分析
The analysis of the execution efficiency of Object-Oriented pro- gramming constructs and mechanisms under different C++ compilers
作者: 涂耀仁
Yaw-Ren Tuw
陈登吉
Deng-Jyi Chen
资讯科学与工程研究所
关键字: No
公开日期: 1992
摘要: 个体导向程式语言主要包含四项程式架构及机能-资料隐藏, 资料抽象
化, 继承, 动态系结. 本文是对个体导向程式语言C++, 分别针对个体导
向之四项程式架构及机能, 相对于传统的程式设计方式作程式执行效率影
响的分析与探讨.我们以C++程式语言分别完成具有上述四项机能的特性
之程式, 并与具有相同功能但以传统的方式完成之程式作效率的比较. 因
为编译器的选择影响执行效率很大, 为求分析结果具有概括性, 故我们使
用六种编译器 --三种属于PC上的编译器, 三种属于工作站上的, 并分
析此六种编译器所产生的结果, 以比较不同C++编译器间有何差异. 从分
析我们得到的结论是:使用继承之特性对执行效率完全没有影响,而其它项
的机能特性并不一定会造成执行效率变差, 且改进部份编译器对上述之机
能的完成方式, 还可以再增进其执行效率. 故使用个体导向方式发展软
体, 并以个体导向程式语言C++来编写程式并不意谓程式之执行效率将因
而降低.
Object-Oriented programming languages consist of four pro-
gramming constructs and mechanisms, namely information
hindding, data abstraction, inheritance, dynamic binding. The
purpose of this study is to analyze the execution
efficiency of Object- Oriented programming constructs and
mechanisms under defferent C++ compilers. We implement
programs using C++ and each of them has one or more property
of the four mechanisms mentioned above. Then we compare them
with those programs that have the same functiona- lity but
are implemented with traditional programming technigue. Since
compilers may produce results of the analysis considerable
differences, six kinds of compilers are used to minimize
the effects from compilers. These compilers are 1) Borland
C++, 2) Zortech C++, 3) MicroSoft C++, 4) SUN gcc version
2.3.3, 5) SUN C++ version 2.1 SC 1.0 and 6) SUN C++ version 2.0
FCS. The first three compilers are for PC environment while the
later three are for workstation. From our study, inheritance
does not affect on the execution efficiency while the other
three machanisms may not always de- crease the execution
efficiency. Further studies indicate that appropriate
compiler optimization will improve the execution efficiency
of these Object-Oriented constructs and mechanisms. Conclusion
from this study favors that Object-Oriented con- structs and
mechanisms implemented based on C++ do not decrease execution
efficiency.Particularly, dynamic binding for some spe- cific
applications could outperform the traditional implementa- tion
technigue both the execution efficiency and flexibility for
implementation.
URI: http://140.113.39.130/cdrfb3/record/nctu/#NT810392047
http://hdl.handle.net/11536/56777
显示于类别:Thesis