• Keith Randall's avatar
    runtime: compute size classes statically · 7ba36f4a
    Keith Randall authored
    No point in computing this info on startup.
    Compute it at build time.
    This lets us spend more time computing & checking the size classes.
    
    Improve the div magic for rounding to the start of an object.
    We can now use 32-bit multiplies & shifts, which should help
    32-bit platforms.
    
    The static data is <1KB.
    
    The actual size classes are not changed by this CL.
    
    Change-Id: I6450cec7d1b2b4ad31fd3f945f504ed2ec6570e7
    Reviewed-on: https://go-review.googlesource.com/32219
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAustin Clements <austin@google.com>
    7ba36f4a
mksizeclasses.go 7.97 KB