【24h】

Optimizing Generic Functions

机译:优化通用功能

获取原文
获取原文并翻译 | 示例

摘要

Generic functions are defined by induction on the structural representation of types. As a consequence, by defining just a single generic operation, one acquires this operation over any particular type. An instance on a specific type is generated by interpretation of the type's structure. A direct translation leads to extremely inefficient code that involves many conversions between types and their structural representations. In this paper we present an optimization technique based on compile-time symbolic evaluation. We prove that the optimization removes the overhead of the generated code for a considerable class of generic functions. The proof uses typing to identify intermediate data structures that should be eliminated. In essence, the output after optimization is similar to hand-written code.
机译:泛型函数是通过对类型的结构表示的归纳来定义的。结果,通过仅定义一个通用操作,就可以在任何特定类型上获取此操作。通过解释类型的结构来生成特定类型的实例。直接翻译会导致代码效率极低,其中涉及类型及其结构表示形式之间的许多转换。在本文中,我们提出了一种基于编译时符号评估的优化技术。我们证明,优化消除了相当数量的通用函数类生成代码的开销。证明使用键入来识别应消除的中间数据结构。从本质上讲,优化后的输出类似于手写代码。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号