• Bobby Powers's avatar
    time: in Format give buffer an initial capacity · c9529e02
    Bobby Powers authored
    I have a small web server that simply sets several cookies
    along with an expires header, and then returns.  In the
    cpuprofile for a 200k request benchmark, time.Time.Format()
    was showing up as 8.3% of cpu usage.  Giving the buffer an
    inital capacity to avoid reallocs on append drops it down to
    7.6%.
    
    R=golang-dev, r
    CC=golang-dev
    https://golang.org/cl/5992058
    c9529e02
Name
Last commit
Last update
..
example_test.go Loading commit data...
format.go Loading commit data...
internal_test.go Loading commit data...
sleep.go Loading commit data...
sleep_test.go Loading commit data...
sys_plan9.go Loading commit data...
sys_unix.go Loading commit data...
sys_windows.go Loading commit data...
tick.go Loading commit data...
tick_test.go Loading commit data...
time.go Loading commit data...
time_test.go Loading commit data...
zoneinfo.go Loading commit data...
zoneinfo_plan9.go Loading commit data...
zoneinfo_read.go Loading commit data...
zoneinfo_unix.go Loading commit data...
zoneinfo_windows.go Loading commit data...