Design and implementation of generics for the .NET Common language runtime
Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation
Fast subtype checking in the HotSpot JVM
JGI '02 Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande
An extended comparative study of language support for generic programming
Journal of Functional Programming
Garbage collection in the next C++ standard
Proceedings of the 2009 international symposium on Memory management
Empirical assessment of object-oriented implementations with multiple inheritance and static typing
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
Coloring, a versatile technique for implementing object-oriented languages
Software—Practice & Experience
Hi-index | 0.00 |
In a programming language, the choice of a generics typing policy impacts both typing test semantics and type safety. In this paper, we compare the cost of the generic policy chosen and analyze its impacts on the subtype test performance. To make this comparison we implement two compilers for the Nit language. One applies covariant policy using a homogeneous implementation and the second applies an erased policy and implementation. We compare the time efficiency of our solution against engines for C++, C#, Eiffel, Java and Scala. Results show that our implementations give the best performances compared to existing solutions. We also compare covariant and erased policies on existing Nit programs using our two compilers. Results show that covariance does not imply significant overhead regarding subtype test performances. Due to the small difference between the costs of the different policies, the choice of a policy by a language designer should not be influenced by performance considerations.