Skip to content

Compiling hello world on RPi spends 4 seconds in coherence checking #22068

Closed
@kmcallister

Description

@kmcallister

My rustc is from @japaric's nightlies. It's pretty slow overall, but what stands out is that we spend nearly 4s on coherence checking.

pi@inky /tmp $ rustc --version
rustc 1.0.0-dev (d3732a12e 2015-02-06 23:30:17 +0000)
pi@inky /tmp $ cat hello-world.rs 
fn main() {
    println!("Hello, world!");
}
pi@inky /tmp $ time rustc -Z time-passes hello-world.rs
time: 0.004     parsing
time: 0.000     recursion limit
time: 0.008     gated macro checking
time: 0.000     configuration 1
time: 0.001     crate injection
time: 0.127     plugin loading
time: 0.000     plugin registration
time: 0.069     expansion
time: 0.000     complete gated feature checking
time: 0.000     configuration 2
time: 0.000     maybe building test harness
time: 0.000     prelude injection
time: 0.000     checking that all macro invocations are gone
time: 0.000     assigning node ids and indexing ast
time: 0.000     external crate/lib resolution
time: 0.002     language item collection
time: 0.176     resolution
time: 0.000     lifetime resolution
time: 0.000     looking for entry point
time: 0.000     looking for plugin registrar
time: 0.000     region resolution
time: 0.000     loop checking
time: 0.000     static item recursion checking
time: 0.003     type collecting
time: 0.000     variance inference
time: 3.853     coherence checking
time: 0.025     type checking
time: 0.069     check static items
time: 0.000     const marking
time: 0.000     const checking
time: 0.001     privacy checking
time: 0.000     stability index
time: 0.000     intrinsic checking
time: 0.000     effect checking
time: 0.001     match checking
time: 0.000     liveness checking
time: 0.105     borrow checking
time: 0.008     rvalue checking
time: 0.000     reachability checking
time: 0.000     death checking
time: 0.000     stability checking
time: 0.000     unused lib feature checking
time: 0.002     lint checking
time: 0.000     resolving dependency formats
time: 0.201     translation
  time: 0.003   llvm function passes
  time: 0.003   llvm module passes
  time: 0.122   codegen passes
  time: 0.007   codegen passes
time: 0.243     LLVM passes
  time: 6.600   running linker
time: 6.611     linking

real    0m12.263s
user    0m7.510s
sys     0m0.720s

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-compiletimeIssue: Problems and improvements with respect to compile times.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions