Language-Dependent performance of design patterns
Page 3
Abstract
The Gang of Four design patterns represent a catalog of 23 reusable design solutions to classes of problems that arise in a variety of applications. This study examines the execution performance of the patterns, as implemented in C++, Java (native and JDK 1.0 through 1.4), Smalltalk, and Perl 5.0. Each pattern is implemented independent of an application and, hence, represents just the pure object structure. Because the patterns themselves demonstrate a variety of structures, the results represent a good benchmark for how well the object-oriented compilers actually handle object-oriented programming, in particular, object creation and object reference to methods/attributes. The results indicate that the C++ compiler provided the fastest code, Java was second, followed by Smalltalk, and then Perl. However, Java 1.2 and 1.4 held their own against the optimized version of C++ and even did slightly better than non-optimized C++. Optimized C++ code was the best in 11 of the 23 patterns, with Java 1.2 and 1.4 sharing the remaining honors for the other 12 patterns, that is, a "winning" Java compiler can be found for just over half of the design patterns. Smalltalk was an order of magnitude, and Perl two orders of magnitude, slower. Although there is a wide variety of performance among the design patterns, the overall averages are much in-line with the averages of four simple test programs. The results may provide guidelines for future application development.
References
[1]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.
[2]
F. Buschmann, R. Meunier, H. Rohnert, P. Sommerlad, and M. Stal, Pattern-Oriented Software Architecture: A System of Patterns. Wiley, 1996.
[3]
M. Grand, Patterns in Java, Vol. 1. Wiley, 1998.
[4]
S. Alpert, K. Brown, and B. Woolf, The Design Patterns Smalltalk Companion. Addison-Wesley, 1998.
[5]
C. Larman, Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, 2nd ed. Prentice Hall, 2002.
[6]
J. Long, "Software reuse antipatterns," ACM Software Engineering Notes, vol. 26, pp. 68--76, July 2001.
- Language-Dependent performance of design patterns
Recommendations
Design patterns for annotation-based APIs
SugarLoafPLoP '16: Proceedings of the 11th Latin-American Conference on Pattern Languages of ProgrammingWith the introduction of code annotations in popular languages like Java and C#, several frameworks and platforms adopted a metadata-based API (Application Programming Interface). By using this approach, instead of extending classes, implementing ...
Comments
Please enable JavaScript to view thecomments powered by Disqus.Information & Contributors
Information
Published In
Copyright © 2003 Author.
Publisher
Association for Computing Machinery
New York, NY, United States
Publication History
Published: 01 May 2003
Published in SIGSOFT Volume 28, Issue 3
Check for updates
Qualifiers
- Article
Contributors
Other Metrics
Bibliometrics & Citations
Bibliometrics
Article Metrics
- 0Total Citations
- 646Total Downloads
- Downloads (Last 12 months)2
- Downloads (Last 6 weeks)1
Reflects downloads up to 09 Jan 2025
Other Metrics
Citations
View Options
Login options
Check if you have access through your login credentials or your institution to get full access on this article.
Sign in