arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.01098cs.SEcs.PL
收藏

垃圾回收使铁锈更易于用途:青铜垃圾收集器的随机对照试验

Garbage Collection Makes Rust Easier to Use: A Randomized Controlled Trial of the Bronze Garbage Collector

Michael Coblenz, Michelle Mazurek, Michael Hicks

摘要:

Rust是一种通用程序设计语言,它是类型安全和内存安全的。Rust不使用垃圾收集器,而是通过一个复杂但复杂的类型系统来实现这些属性。这样做使Rust非常高效,但使Rust相对难以学习和使用。我们为Rust设计了Bronze,一个可选的、基于库的垃圾收集器。为了看看Bronze是否能让Rust更有用,我们对来自633人班级的志愿者进行了一项随机对照试验,总共收集了428名学生的数据。我们发现,对于需要管理复杂别名的任务,青铜级用户更有可能在可用时间内完成任务,而那些这样做的人只需要大约三分之一的时间(4小时对12小时)。我们发现总时间没有显著差异,即使青铜用户在没有青铜之后重新完成任务。调查表明,所有权、借用和生命周期是用户在使用Rust时面临挑战的主要原因。

英文摘要:

Rust is a general-purpose programming language that is both type- and memory-safe. Rust does not use a garbage collector, but rather achieves these properties through a sophisticated, but complex, type system. Doing so makes Rust very efficient, but makes Rust relatively hard to learn and use. We designed Bronze, an optional, library-based garbage collector for Rust. To see whether Bronze could make Rust more usable, we conducted a randomized controlled trial with volunteers from a 633-person class, collecting data from 428 students in total. We found that for a task that required managing complex aliasing, Bronze users were more likely to complete the task in the time available, and those who did so required only about a third as much time (4 hours vs. 12 hours). We found no significant difference in total time, even though Bronze users re-did the task without Bronze afterward. Surveys indicated that ownership, borrowing, and lifetimes were primary causes of the challenges that users faced when using Rust.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑