直到今天早上,“货物火焰图”比“货物建造-释放”后的“货物运行”慢一些。
我做了一个小小的改变,换掉了:
std::collections::{HashMap, HashSet};
与:
rustc_hash::{FxHashMap, FxHashSet};
但是,我想不出为什么这(或任何事情)可能会导致“货物火焰图”突然大幅超越“货物运行”。
cargo run 将内置 调试 模式并运行它。
cargo run
如果你想运行release,要么使用工件 target/release/project_name[.exe] ,或执行 cargo run --release .
target/release/project_name[.exe]
cargo run --release