垃圾回收使 Rust 更易用:Bronze 垃圾回收器的随机对照试验
软件工程
2022-02-16 v2 编程语言
摘要
Rust 是一种兼具类型安全与内存安全的通用编程语言。Rust 不使用垃圾回收器,而是通过复杂但精巧的类型系统实现这些特性。这样做使 Rust 非常高效,但也使其相对难以学习和使用。我们设计了 Bronze,一个可选的、基于库的 Rust 垃圾回收器。为考察 Bronze 是否能提升 Rust 的可用性,我们在来自 633 人班级的志愿者中开展了随机对照试验,共收集了 428 名学生的数据。我们发现,对于需要管理复杂别名关系的任务,Bronze 用户更有可能在限定时间内完成任务,且完成者仅耗时约三分之一(4 小时对比 12 小时)。即使 Bronze 用户随后在无 Bronze 情况下重做了任务,我们发现总耗时无显著差异。调查表明,所有权、借用和生命周期是用户使用 Rust 时面临挑战的主要原因。
引用
@article{arxiv.2110.01098,
title = {Garbage Collection Makes Rust Easier to Use: A Randomized Controlled Trial of the Bronze Garbage Collector},
author = {Michael Coblenz and Michelle Mazurek and Michael Hicks},
journal= {arXiv preprint arXiv:2110.01098},
year = {2022}
}
备注
Michael Coblenz, Michelle L. Mazurek, and Michael Hicks. 2022. Garbage Collection Makes Rust Easier to Use: A Randomized Controlled Trial of the Bronze Garbage Collector. In 44th International Conference on Software Engineering (ICSE '22), May 21-29, 2022, Pittsburgh, PA, USA. ACM, New York, NY, USA, 12 pages. https://doi.org/10.1145/3510003.3510107