There was a bug in makeN that caused lots of unnecessary
allocations. Fixing this exposed a few bugs in other
functions which worked when makeN allocated a new slice, but
failed when it simply resized an existing slice. The result
is a pretty big performance improvement. When running
pidigits, here were the numbers I got on amd64:
Before this change:
pidigits 10000
gcc -O2 pidigits.c -lgmp 2.09u 0.02s 2.11r
gc pidigits 12.68u 0.04s 12.72r
gc_B pidigits 12.71u 0.03s 12.75r
After:
pidigits 10000
gcc -O2 pidigits.c -lgmp 2.09u 0.00s 2.10r
gc pidigits 6.82u 0.00s 6.85r
gc_B pidigits 6.55u 0.01s 6.59r
R=rsc, gri
CC=golang-dev
https://golang.org/cl/953042
Due to page boundary rounding, the header would have
been loaded as part of the text segment already, but this
change placates the "paxctl" tool on so-called hardened
Linux distributions (as if normal distributions weren't already
hard enough to use).
R=r
CC=golang-dev
https://golang.org/cl/954041
SETSID does return an errno - any reason why it has been done this
way in zsyscall_linux_* ? Otherwise it should be the same as darwin.
From SETSID(2) on my Linux box:
ERRORS
On error, -1 is returned, and errno is set.
Fixes#730
R=rsc
CC=golang-dev
https://golang.org/cl/878047
This is the first of probably four separate CLs
for the new implementation of the json package.
The scanner is the core of the new implementation.
The other CLs would be the new decoder,
the new encoder, and support for JSON streams.
R=r
CC=golang-dev
https://golang.org/cl/802051
$ godoc xml | grep Copy\(\)
func (c CharData) Copy() CharData
func (c Comment) Copy() Comment
func (d Directive) Copy() Directive
func (p ProcInst) Copy() ProcInst
func (e StartElement) Copy() StartElement
--------------------------------------------
$ godoc -src xml | grep Copy\(\)
func (c CharData) Copy() CharData
--------------------------------------------
$ godoc -src xml Copy
func (c CharData) Copy() CharData { return CharData(makeCopy(c)) }
--------------------------------------------
The command "godoc -src pkg_name" should output the interface of the named package, but it excludes all duplicate entries. Also the command "godoc -src pkg_name method_name" will output the source code only for one method even if there are more of them with the same name in the same package. This patch set fixes this issue.
R=gri
CC=golang-dev
https://golang.org/cl/883051
fmt.Printf("%b", int8(-1)) prints 64 ones instead of 8.
This happens only for signed integers (int8, in16 and int32). I guess it's because of the way the conversion between integer types works. From go spec: "Conversions between integer types. If the value is a signed quantity, it is sign extended to implicit infinite precision ....". And there are several conversions to int64 and uint64 in the fmt package. This pathch solves only half of the problem. On a 32 bit system, an fmt.Printf("%b", int(-1)) should still print 64 ones.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/891049