Rust Borrow Checker Gets Alias-Based Formulation for Better Performance
TL;DR. A new alias-based formulation for the Rust borrow checker offers potential improvements over existing non-lexical lifetimes (NLL) analysis. - The prototype passes current NLL test suites and handles cases the previous analysis could not. - The core change redefines 'a (lifetime) to correspond to a set of loans, not source code portions. - This revised approach aims to enhance compiler efficiency and support future language features. - Optimization efforts are ongoing, as the initial prototype is slower than existing analysis.
- New alias-based formulation for Rust's borrow checker introduced.
- Prototype passes existing NLL test suite and resolves previous issues.
- Changes the interpretation of 'a (lifetime) from source code portions to a set of borrow expressions.
- Aims for improved performance and better support for future language features.
- Initial performance is slower, but significant optimization potential exists.
Sources
- An alias-based formulation of the borrow checker (2018) — smallcultfollowing.com