-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
analyze: borrowck performance improvements (#1111)
I found some easy borrowck/Polonius performance improvements while investigating a performance regression on a development branch. 1. Use `BufReader`/`BufWriter` when loading/saving from the `polonius_cache`. Otherwise `bincode` reads/writes each 8-byte field individually. 2. Don't dump Polonius facts to `inspect/FUNC/*.facts` unless requested with `C2RUST_ANALYZE_DUMP_POLONIUS_FACTS=1`. This takes a nontrivial amount of time for big functions and is only needed when debugging certain borrowck issues. Improvements compared to master (all measurements taken on the second run, after populating `polonius_cache/`): * `cargo test algo_md5`: 25s -> 4.6s * `cargo test --release algo_md5`: 16s -> 2.1s
- Loading branch information
Showing
2 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters