• 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
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...