-
- Downloads
runtime: compute size classes statically
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:Austin Clements <austin@google.com>
Showing
- src/runtime/malloc.go 11 additions, 21 deletionssrc/runtime/malloc.go
- src/runtime/mbitmap.go 2 additions, 2 deletionssrc/runtime/mbitmap.go
- src/runtime/mheap.go 2 additions, 2 deletionssrc/runtime/mheap.go
- src/runtime/mksizeclasses.go 309 additions, 0 deletionssrc/runtime/mksizeclasses.go
- src/runtime/msize.go 5 additions, 247 deletionssrc/runtime/msize.go
- src/runtime/sizeclasses.go 27 additions, 0 deletionssrc/runtime/sizeclasses.go
Loading
Please register or sign in to comment