1
0
mirror of https://github.com/golang/go synced 2024-10-04 12:21:26 -06:00
go/src/pkg
Cristian Staretu fe5a358aae archive/tar: reuse temporary buffer in writeHeader
A temporary 512 bytes buffer is allocated for every call to
writeHeader. This buffer could be reused the lower the number
of memory allocations.

benchmark                   old ns/op     new ns/op     delta
BenchmarkWriteFiles100k     634622051     583810847     -8.01%

benchmark                   old allocs     new allocs     delta
BenchmarkWriteFiles100k     2701920        2602621        -3.68%

benchmark                   old bytes     new bytes     delta
BenchmarkWriteFiles100k     115383884     64349922      -44.23%

This change is very important if your code has to write a lot of
tarballs with a lot of files.

LGTM=dsymonds
R=golang-codereviews, dave, dsymonds
CC=golang-codereviews
https://golang.org/cl/107440043
2014-07-03 09:40:53 +10:00
..
archive archive/tar: reuse temporary buffer in writeHeader 2014-07-03 09:40:53 +10:00
bufio bufio: Fixed call to Fatal, should be Fatalf. 2014-07-02 07:04:01 -07:00
builtin
bytes bytes, strings: optimize Repeat 2014-06-11 19:03:59 -07:00
compress compress/lzw: add commentary that TIFF's LZW differs from the standard 2014-06-13 17:44:29 +10:00
container container/heap: update example code 2014-05-15 13:58:13 -07:00
crypto crypto/rsa: fix out-of-bound access with short session keys. 2014-07-02 15:28:57 -07:00
database/sql database/sql/driver: correct method name in comment 2014-05-21 06:48:41 -07:00
debug debug/elf: support DWARF that needs relocs for 386 2014-06-03 16:39:40 -07:00
encoding encoding/gob: fewer decAlloc calls 2014-07-01 14:19:27 -04:00
errors
expvar all: spelling tweaks, A-G 2014-04-29 12:44:40 -04:00
flag flag: add a little more doc comment to Duration. 2014-06-28 20:47:06 +10:00
fmt fmt: fix typo in help doc 2014-06-24 16:59:33 -07:00
go all: add GOOS=android 2014-07-01 17:21:50 -04:00
hash all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
html text/template,html/template: document that partial results may be written on error 2014-05-19 14:29:45 -07:00
image image/png: remove unnecessary function call 2014-06-23 10:29:56 +10:00
index/suffixarray index/suffixarray: reduce size of a benchmark 2014-06-24 20:37:28 -07:00
io io: copy slice argument in MultiReader and MultiWriter 2014-05-12 23:38:35 -04:00
log log/syslog: document if network=="" for Dial, it will connect to local syslog server. 2014-04-28 14:29:45 -04:00
math math: remove Nextafter64 alias in favor of existing Nextafter 2014-06-11 14:24:16 -07:00
mime src, misc: applied gofmt -w -s 2014-07-01 10:28:10 -07:00
net src, misc: applied gofmt -w -s 2014-07-01 10:28:10 -07:00
os os: disable TestGetppid on plan9 2014-06-14 16:47:40 +10:00
path build: make nacl pass 2014-05-20 12:10:19 -04:00
reflect src, misc: applied gofmt -w -s 2014-07-01 10:28:10 -07:00
regexp src, misc: applied gofmt -w -s 2014-07-01 10:28:10 -07:00
runtime build: annotations and modifications for c2go 2014-07-02 15:41:29 -04:00
sort std lib: fix various typos in comments 2014-05-02 13:17:55 -07:00
strconv strconv: CanBackquote should reject \x7F 2014-03-19 10:16:48 +11:00
strings strings: Replacer is safe for concurrent use 2014-06-28 15:53:07 -07:00
sync sync: detect incorrect usages of RWMutex 2014-06-19 22:19:56 -07:00
syscall misc/nacl, syscall: lazily initialize fs on nacl. 2014-07-01 18:24:43 -04:00
testing testing: make benchmarking faster 2014-06-24 08:39:30 -07:00
text text/scanner: fix comment 2014-06-17 09:34:11 -07:00
time time: change formatting of microseconds duration to SI modifier 2014-06-12 17:01:13 -07:00
unicode unicode: fix doc typo 2014-05-11 22:06:00 -07:00
unsafe