The scanner returns slices into the original source
for token values. If those slices are making it into
the AST and from there into other long-living data
structures (e.g. godoc search), references to the
original source are kept around involuntarily.
For the current godoc and source tree, this change reduces
memory consumption after indexing and before GC by ~92MB
or almost 30%, and by ~10MB after GC (or about 6%).
R=rsc
CC=golang-dev
https://golang.org/cl/4273072
In conjunction with the non-blocking system call CL, this
gives about an 8% performance improvement on a client/server
test running on my local machine.
R=rsc, iant2
CC=golang-dev
https://golang.org/cl/4272057
- just an oversight; we were reallocating a buffer.
- use unsafe to avoid allocating storage for a string twice.
R=rsc
CC=golang-dev
https://golang.org/cl/4290056
Permit system calls to be designated as non-blocking, meaning
that we simply call them without involving the scheduler.
This change by itself is mostly performance neutral. In
combination with a following change to the net package there
is a performance advantage.
R=rsc, dfc, r2, iant2, rsc1
CC=golang-dev
https://golang.org/cl/4278055
- use enc.err and dec.err instead of return values in deferred error catcher
- replace io.WriteString with buffer.WriteString
now at:
mallocs per encode of type Bench: 7
mallocs per decode of type Bench: 8
R=rsc
CC=golang-dev
https://golang.org/cl/4277057
This just returns a ClientConn suitable for writing
proxy requests. To be used in Transport.
R=rsc, petar-m
CC=golang-dev
https://golang.org/cl/4290052
The -test.run and -test.bench flags were compilng the regexp for ever test
function, which was mucking up memory profiles. Add a simple wrapper
to save the compiled state so that the regexp is compiled only once for
each flag.
R=rsc
CC=golang-dev
https://golang.org/cl/4274063
Dependency on bufio crept in during last CL; this breaks the cycle.
Also add a missing '-' to the documentation.
R=rsc
CC=golang-dev
https://golang.org/cl/4274061
There is some disagreement about how to deal with hash values larger
than the curve order size. We choose to follow OpenSSL's lead here.
R=bradfitzgo, r
CC=golang-dev
https://golang.org/cl/4273059
If braces don't have position information for a composite
literal, don't assume alignment of key:value pairs under
the (wrong) assumption that there may be multiple lines.
R=rsc
CC=golang-dev
https://golang.org/cl/4297043
On my mac:
mallocs per rpc round trip: 144
rpc.BenchmarkEndToEnd 10000 228244 ns/op
Room for improvement.
R=rsc
CC=golang-dev
https://golang.org/cl/4274058
Swapping the goroutines lets them reuse the
communication completion on v instead of
needing a second channel (done).
R=gri
CC=golang-dev
https://golang.org/cl/4287045