跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 程序设计语言

arXiv:2312.11257 (cs)
[提交于 2023年12月18日]

标题:Destination-passing style programming: a Haskell implementation

作者:Thomas Bagrel
查看论文《Destination-passing style programming: a Haskell implementation》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Destination-passing style programming introduces destinations, which represent the address of a write-once memory cell. Those destinations can be passed as function parameters, and thus enable the caller of a function to keep control over memory management: the body of the called function will just be responsible of filling that memory cell. This is especially useful in functional programming languages, in which the body of a function is typically responsible for allocation of the result value. Programming with destination in Haskell is an interesting way to improve performance of critical parts of some programs, without sacrificing memory guarantees. Indeed, thanks to a linearly-typed API I present, a write-once memory cell cannot be left uninitialized before being read, and is still disposed of by the garbage collector when it is not in use anymore, eliminating the risk of uninitialized read, memory leak, or double-free errors that can arise when memory is managed manually. In this article, I present an implementation of destinations for Haskell, which relies on so-called compact regions. I demonstrate, in particular, a simple parser example for which the destination-based version uses 35% less memory and time than its naive counterpart for large inputs.
评论: 20 pages. 9 figures, 9 tables. Submitted and soon to be published at JFLA 2024 (https://jfla.inria.fr/jfla2024.html)
主题: 程序设计语言 (cs.PL)
引用方式: arXiv:2312.11257 [cs.PL]
  (或者 arXiv:2312.11257v1 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.2312.11257

提交历史

来自:Thomas Bagrel
[v1] 2023年12月18日 星期一 14:53:45 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.PL
< 上一篇   |   下一篇 >
最新 | 近期 | 2023-12
切换浏览方式为:
cs

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站