一句话:挖掘 100 个 GitHub 知名 Rust 项目并收集 122 个性能缺陷,揭示动态检查与内存管理机制引发的性能问题。
Rust 作为系统编程语言,通过所有权机制和零成本抽象同时追求高效与内存安全,但这些复杂特性也可能让开发者写出效率低下的代码。本文旨在实证研究真实 Rust 项目中性能缺陷的特征。作者挖掘了 GitHub 上 100 个知名项目的仓库,收集到 122 个性能缺陷,并对其进行分类与分析。研究重点展示了两个主要发现:一是来自 Rust 动态检查机制的性能问题,二是来自其内存管理机制的性能问题。作者希望这些发现能提升 Rust 复杂而强大语言特性的可用性,帮助开发者更高效地编写安全、高性能的代码。
Rust is a system programming language that emphasizes both efficiency and memory safety. It achieves comparable efficiency with C/C++ by pursuing the concept of zero-cost abstraction and memory safety via its ownership scheme. As a side effect, these features may also steepen the learning curve for developers, potentially leading to the use of inefficient code in their programs. In this paper, we aim to investigate the characteristics of performance bugs that occur in real-world Rust projects. To this end, we have mined the repository of 100 well-known projects on GitHub and collected 122 performance bugs. We showcase two main findings including performance issues from Rust's dynamic checking and memory management mechanisms. We hope our work can enhance the usability of Rust's complex yet powerful language features, empowering developers to write safe, high-performance code more efficiently.
DOI 原文 ·
@inproceedings{paperbot8306,
title = {Finding Performance Issues in Rust Projects},
author = {Chenhao Cui},
booktitle = {ASE},
year = {2024},
doi = {10.1145/3691620.3695368}
}