Skip to content
  • Darius Davis's avatar
    static-ify a bunch of const locals. · ea4b5de0
    Darius Davis authored and John Thacker's avatar John Thacker committed
    The compiler will emit code to initialize "const" local variables at scope
    entry.  If the initializer is compile-time constant, making them "static" will
    allow that local variable to be instead statically initialized and placed in a
    read-only data segment, with there no longer being any need for code to
    initialize them.  This has benefits in reducing program text size and
    increasing performance through the removal of initialization code.
    
    The arbitrary collection of "const" locals in this change amount to 3.8 kBytes
    of eliminated initialization code for an increase of 1.8 kBytes of read-only
    data.
    ea4b5de0