Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make release builds the default #17496

Closed
wants to merge 1 commit into from
Closed

make release builds the default #17496

wants to merge 1 commit into from

Commits on Oct 6, 2014

  1. make release builds the default

    This cuts the compilation time for a trivial Rust program by 15-20% on
    Windows due to a massive improvement in `rustc` start-up time. The debug
    logging has a very high cost because it makes extensive use of mutable
    global variables and those result in expensive relocations. It also
    makes jemalloc debug assertions / logging tied to the same flag as ones
    in the standard library or compiler.
    
    Enabling debug assertions by default discourages their use, because
    normal builds will be paying a cost for each one. The few debug
    assertions not removed before landing a pull request are a significant
    performance problem for types like `RefCell`.
    
    The defaults should cater to users or packagers building Rust rather
    than compiler developers. A compiler developer can be expected to
    override a default flag, but the same cannot be said of someone who
    lacks the same in-depth knowledge of the project.
    
    Even someone working on the standard libraries is not going to want to
    pay the high cost for debug logging. Many people who contribute to the
    compiler don't use the feature either, because a debugger tends to work
    a lot better than inconsistent / bit-rotted logging code.
    thestinger committed Oct 6, 2014
    Configuration menu
    Copy the full SHA
    b60ea12 View commit details
    Browse the repository at this point in the history