Changeset 67e8e192 for doc/generic_types/generic_types.tex
- Timestamp:
- Apr 15, 2017, 2:31:59 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 308880c
- Parents:
- b23d969 (diff), c0e7723 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/generic_types.tex
rb23d969 r67e8e192 1107 1107 However, every \CFA feature is different than its \CC counterpart, often with extended functionality, better integration with C and its programmers, and always supporting separate compilation. 1108 1108 All of these new features are being used by the \CFA development-team to build the \CFA runtime system. 1109 Finally, we demonstrate that \CFA performance for some idiom tic cases is better than C and close to \CC, showing the design is competitive.1109 Finally, we demonstrate that \CFA performance for some idiomatic cases is better than C and close to \CC, showing the design is competitive. 1110 1110 1111 1111 There is ongoing work on a wide range of \CFA feature extensions, including reference types, exceptions, and concurrent programming primitives. 1112 In addition to this work, there are some interesting future directions the polymorphism design could take.1112 In addition, there are interesting future directions for the polymorphism design. 1113 1113 Notably, \CC template functions trade compile time and code bloat for optimal runtime of individual instantiations of polymorphic functions. 1114 \CFA polymorphic functions, by contrast, use an approach that is essentially dynamic virtual dispatch. 1115 The runtime overhead of this approach is low, but not as low as \CC template functions, and it may be beneficial to provide a mechanism for particularly performance-sensitive code to close this gap. 1116 Further research is needed, but two promising approaches are to allow an annotation on polymorphic function call sites that tells the translator to create a template-specialization of the function (provided the code is visible in the current translation unit) or placing an annotation on polymorphic function definitions that instantiates a version of the polymorphic function specialized to some set of types. 1117 These approaches are not mutually exclusive, and would allow these performance optimizations to be applied only where most useful to increase performance, without suffering the code bloat or loss of generality of a template expansion approach where it is unnecessary. 1114 \CFA polymorphic functions, by contrast, uses a dynamic virtual dispatch. 1115 The runtime overhead of this approach is low, but not as low as inlining, and it may be beneficial to provide a mechanism for performance-sensitive code. 1116 Two promising approaches are an @inline@ annotation at polymorphic function call sites to create a template-specialization of the function (provided the code is visible) or placing an @inline@ annotation on polymorphic function-definitions to instantiate a specialized version for to some set of types. 1117 These approaches are not mutually exclusive, and allow performance optimizations to be applied only when necessary, without suffering global code-bloat. 1118 In general, we believe separate compilation producing smaller code works well with loaded hardware-caches, which may offset the benefit of larger inlined code. 1118 1119 1119 1120
Note: See TracChangeset
for help on using the changeset viewer.