Hybridizer supports generics and virtual functions. These concepts allow writing flexible code with type parameters, defering actual behavior resolution to type instanciation by client code. These are fondamental features of modern languages, easing encapsulation, code factorization and concepts expression. However in C#, type parameters are resolved at runtime, which comes with a significant performance penalty. […]
Virtual functions come with a significant performance penalty. In order to overcome this, we map generics to templates. The generated source code can then be inlined, and the flexibility of objects can still be used with performance. Expm1 GFLOPS GCFLOPS usage Local 975 538 92% Dispatch 478 263 45% peak 1174 587 – Template concepts […]
Tags: Generics