首页> 外文期刊>Computer Languages, Systems & Structures >Implementing a performant scheme interpreter for the web in asm.js
【24h】

Implementing a performant scheme interpreter for the web in asm.js

机译:在asm.js中为网络实现高性能方案解释器

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

This paper presents the implementation of an efficient interpreter for a Scheme-like language using manually written asmjs code. The asm.js specification defines an optimizable subset of JavaScript that has already served well as a compilation target for web applications where performance is critical. However, its usage as a human-writable language that can be integrated into existing projects to improve performance has remained largely unexplored. We therefore apply this strategy to optimize the implementation of an interpreter. We also discuss the feasibility of this approach, as writing asmjs by hand is generally not its recommended use-case. We therefore present a macro system to solve the challenges we encounter. The resulting interpreter is compared to the original C implementation and its compiled equivalent in asmjs. This way, we evaluate whether manual integration with asm.js provides the necessary performance to bring larger applications and runtimes to the web. We also refactor our implementation to assess how more JavaScript code can cohabit with asmjs code, improving maintainability of the implementation while preserving near-native performance. In the case of our interpreter, this improved maintainability enables adding more complex optimizations. We investigate the addition of function inlining, for which we validate the performance gain. (C) 2017 Elsevier Ltd. All rights reserved.
机译:本文介绍了一种使用人工编写的asmjs代码对类似于Scheme的语言进行有效解释的实现。 asm.js规范定义了可优化的JavaScript子集,该子集已经很好地用作了性能至关重要的Web应用程序的编译目标。但是,将其用作可写语言并集成到现有项目中以提高性能的方法在很大程度上尚未得到开发。因此,我们应用此策略来优化解释器的实现。我们还讨论了这种方法的可行性,因为通常不建议手动编写asmjs。因此,我们提出了一个宏系统来解决我们遇到的挑战。将结果解释器与原始C实现及其在asmjs中编译的等效项进行比较。通过这种方式,我们评估了与asm.js的手动集成是否提供了将大型应用程序和运行时引入网络的必要性能。我们还重构了实现,以评估更多JavaScript代码可与asmjs代码共存的方式,从而在保持近乎本机性能的同时提高了实现的可维护性。就我们的解释器而言,这种改进的可维护性允许添加更多复杂的优化。我们研究了函数内联的附加功能,以验证其性能提升。 (C)2017 Elsevier Ltd.保留所有权利。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号