Performance analysis of generics in scientific computing

Laurentiu Dragan, Stephen M. Watt · 2005

This paper studies the performance of generics, or templates as they are sometimes called, for scientific computing in various programming languages. In order to understand the cost of using generics, we develop a test suite for generics based on a standard numeric benchmark. We compare the results of this new benchmark for generics in C++, C# and Java, both between language implementations and against the specialized, non-generic benchmark. We also compare the efficiency of C++ with Aldor a language originally for computer algebra relying entirely on generics. We find that the implementation of generics in current compilers must be improved before they are used for efficiency-critical scientific applications, and we identify specific areas for potential optimization.

Read the paper · More papers on PaperTik