We profile https://github.com/graphprotocol/graph-node, an indexer implementation for The Graph protocol.
Our modded compiler is 21% faster than the default compiler. We shrank incremental build time from 6.3 seconds to 5.0 seconds. Full timings reports, and an analysis/report are attached.
# Full cargo check
graph-node$ RUSTFLAGS="-C linker=/usr/bin/clang -Zself-profile -Zself-profile-events=default,args -Zthreads=8 --cfg tokio_unstable" cargo +nightly check --target-dir target-nightly --timings
# Simulate a code change
graph-node$ touch graph/src/schema/api.rs
# Incremental cargo check
graph-node$ RUSTFLAGS="-C linker=/usr/bin/clang -Zself-profile -Zself-profile-events=default,args -Zthreads=8 --cfg tokio_unstable" cargo +nightly check --target-dir target-nightly --timings
# Full cargo check
graph-node$ RUSTFLAGS="-C linker=/usr/bin/clang -Zself-profile -Zself-profile-events=default,args -Zthreads=8 --cfg tokio_unstable" cargo +kap check --target-dir target-nightly --timings
# Simulate a code change
graph-node$ touch graph/src/schema/api.rs
# Incremental cargo check
graph-node$ RUSTFLAGS="-C linker=/usr/bin/clang -Zself-profile -Zself-profile-events=default,args -Zthreads=8 --cfg tokio_unstable" cargo +kap check --target-dir target-nightly --timings