1
0
mirror of https://github.com/golang/go synced 2024-10-04 00:31:23 -06:00
go/src/pkg
Nigel Tao daf43ba476 image/jpeg: change block from [64]int to [64]int32.
On 6g/linux:
benchmark                     old ns/op    new ns/op    delta
BenchmarkFDCT                      4606         4241   -7.92%
BenchmarkIDCT                      4187         3923   -6.31%
BenchmarkDecodeBaseline         3154864      3170224   +0.49%
BenchmarkDecodeProgressive      4072812      4017132   -1.37%
BenchmarkEncode                39406920     34596760  -12.21%

Stack requirements before (from 'go tool 6g -S'):
(scan.go:37) TEXT    (*decoder).processSOS+0(SB),$1352-32
(writer.go:448) TEXT    (*encoder).writeSOS+0(SB),$5344-24

after:
(scan.go:37) TEXT    (*decoder).processSOS+0(SB),$1064-32
(writer.go:448) TEXT    (*encoder).writeSOS+0(SB),$2520-24

Also, in encoder.writeSOS, re-use the yBlock scratch buffer for Cb and
Cr. This reduces the stack requirement slightly, but also avoids an
unlucky coincidence where a BenchmarkEncode stack split lands between
encoder.writeByte and bufio.Writer.WriteByte, which occurs very often
during Huffman encoding and is otherwise disasterous for the final
benchmark number. FWIW, the yBlock re-use *without* the s/int/int32/
change does not have a noticable effect on the benchmarks.

R=r
CC=golang-dev, rsc
https://golang.org/cl/6823043
2012-10-30 11:10:08 +11:00
..
archive archive/tar: fix inconsistent namespace usage in example 2012-10-02 08:10:42 +10:00
bufio bufio: remove a little unnecessary indirection in tests. 2012-10-20 13:02:29 +11:00
builtin builtin: Changed documentation for rune type. 2012-09-18 11:01:10 -07:00
bytes bytes, strings: add (*Reader).WriteTo 2012-10-12 14:43:50 +11:00
compress compress/bzip2: use io.ByteReader instead of internal interface 2012-10-12 14:09:24 -07:00
container container/list: fix typo 2012-10-28 21:16:50 +11:00
crypto crypto/x509: always write validity times in UTC. 2012-10-29 11:16:58 -04:00
database/sql database/sql: stop reuse of bad connections 2012-08-23 19:29:47 -07:00
debug debug/pe: support PE files which contain no symbol table (if NumberOfSymbols is equal to 0 in the IMAGE_FILE_HEADER structure). 2012-10-09 11:15:53 +11:00
encoding encoding/json: tweak docs 2012-10-29 20:58:24 +01:00
errors pkg: a slew of examples 2012-02-18 11:48:33 +11:00
exp exp/locale/collate: slightly changed collation elements: 2012-10-25 13:02:31 +02:00
expvar expvar: add locking to String, and use RWMutex properly throughout. 2012-03-06 09:13:26 +11:00
flag flag: fix bug in handling of booleans on error 2012-07-27 16:13:29 -07:00
fmt fmt: document some undocumented details 2012-10-12 16:16:55 +11:00
go go/build: document the behavior of multiple build constraints. 2012-10-22 11:15:17 +11:00
hash build: make int 64 bits on amd64 2012-09-24 20:57:01 -04:00
html gofmt: apply gofmt -w -s src misc 2012-10-09 17:01:28 -07:00
image image/jpeg: change block from [64]int to [64]int32. 2012-10-30 11:10:08 +11:00
index/suffixarray all: various typos 2012-03-13 17:29:07 -07:00
io io/ioutil: use pathname instead of name in docs to avoid confusion 2012-10-13 19:05:22 +08:00
log log/syslog: don't append \n if there is one 2012-07-27 14:22:27 -04:00
math math/big: add 4-bit, fixed window exponentiation. 2012-10-17 11:19:26 -04:00
mime net,mime: Minor corrections to documentation comments. 2012-09-07 10:24:55 -07:00
net net/http/client.go: fix cookie handling on (*Client) Do() 2012-10-29 17:56:31 +01:00
old/netchan old/regexp, old/template: delete. 2012-04-27 15:12:24 +10:00
os os: fix documentation typos: s/an array/a slice/. 2012-10-22 16:26:47 +11:00
path path/filepath: better documentation for WalkFunc 2012-10-17 16:00:09 +11:00
reflect reflect: stop thinking that MaxFloat32 overflows float32. 2012-10-26 08:39:36 +02:00
regexp regexp/syntax: define accepted syntax 2012-09-24 15:33:53 -04:00
runtime runtime: switch to 64-bit goroutine ids 2012-10-26 10:13:06 +04:00
sort sort: Fixed a typo in the documentation for SearchStrings. 2012-10-28 10:07:59 +11:00
strconv strconv: faster FormatFloat for fixed number of digits. 2012-09-01 16:31:46 +02:00
strings bytes, strings: add (*Reader).WriteTo 2012-10-12 14:43:50 +11:00
sync sync/atomic: FreeBSD/ARM support 2012-10-17 14:27:58 +08:00
syscall syscalls: annotate Sendfile() for race detector 2012-10-29 23:15:06 +04:00
testing testing: change -test.benchtime to a flag.Duration. 2012-10-09 08:57:29 +11:00
text text/template: fix nil crash on Templates 2012-10-07 09:26:59 +11:00
time time: accept numbers larger than 2^32 in ParseDuration. 2012-10-15 07:50:13 +11:00
unicode unicode: performance improvements (API change) 2012-09-21 00:35:25 -04:00
unsafe unsafe: fix a typo 2012-10-19 16:35:15 +11:00