【文件属性】:
文件名称:Generic Programming for Scientific Computing in C++, Java, and C#
文件大小:148KB
文件格式:PDF
更新时间:2012-07-12 05:17:31
泛型 java c#
(论文)Abstract:Parameterized types (generics) have been announced for the
JavaTM and C# programming languages. In this paper, we evaluate these
extensions with respect to the realm of scientific computing and compare
them with C++ templates. At the heart of our comparison are the
set and relation classes from the Janus framework which provides abstraction
for the efficient representation of meshes, sparse graphs and
associated matrices. As an example, we compare the performance of the
Bellman-Ford single source shortest path algorithm when using parameterized
Janus data structures implemented in C++, JavaTM, and C#.
Our measurements suggest that both JavaTM and C# generics introduce
only little run time overhead when compared with non-parameterized implementations.
With respect to scientific application, C# generics have
the advantage of allowing value types (including builtin types) as parameters
of generic classes and methods.