首页> 外文会议> >Representing control in the presence of first-class continuations
【24h】

Representing control in the presence of first-class continuations

机译:在存在一流延续的情况下表示控制

获取原文

摘要

Languages such as Scheme and Smalltalk that provide continuations as first-class data objects present a challenge to efficient implementation. Allocating activation records in a heap has proven unsatisfactory because of increased frame linkage costs, increased garbage collection overhead, and decreased locality of reference. However, simply allocating activation records on a stack and copying them when a continuation is created results in unbounded copying overhead. This paper describes a new approach based on stack allocation that does not require the stack to be copied when a continuation is created and that allows us to place a small upper bound on the amount copied when a continuation is reinstated. This new approach is faster than the naive stack allocation approach, and it does not suffer from the problems associated with unbounded copying. For continuation-intensive programs, our approach is at worst a constant factor slower than the heap allocation approach, and for typical programs, itis significantly faster. An important additional benefit is that recovery from stack overflow is handled gracefully and efficiently.

机译:

诸如Scheme和Smalltalk之类的语言提供连续性作为一流的数据对象,这对有效实现提出了挑战。由于增加了框架链接成本,增加了垃圾收集开销以及减少了引用位置,事实证明,在堆中分配激活记录并不令人满意。但是,仅在堆栈上分配激活记录并在创建连续性时将其复制会导致无限制的复制开销。本文介绍了一种基于堆栈分配的新方法,该方法不需要在创建连续性时复制堆栈,并且允许我们在恢复连续性时在复制量上设置一个小的上限。这种新方法比朴素的堆栈分配方法要快,并且不会遭受与无限制复制相关的问题的困扰。对于连续密集型程序,我们的方法在最坏的情况下要比堆分配方法慢一个常数因子,而对于典型的程序,则要明显快得多。另一个重要的好处是,可以优雅而有效地处理从堆栈溢出中进行的恢复。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号