1
0
mirror of https://github.com/golang/go synced 2024-10-02 14:38:33 -06:00
Commit Graph

3 Commits

Author SHA1 Message Date
Matthew Dempsky
0da4dbe232 all: remove unnecessary type conversions
cmd and runtime were handled separately, and I'm intentionally skipped
syscall. This is the rest of the standard library.

CL generated mechanically with github.com/mdempsky/unconvert.

Change-Id: I9e0eff886974dedc37adb93f602064b83e469122
Reviewed-on: https://go-review.googlesource.com/22104
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-15 07:31:45 +00:00
Taru Karttunen
f5f480e1df os: reduce allocations in Readdir on unix
Include syscall.Stat_t on unix to the
unexported fileStat structure rather than
accessing it though an interface.

Additionally add a benchmark for Readdir
(and Readdirnames).

Tested on linux, freebsd, netbsd, openbsd
darwin, solaris, does not touch windows
stuff. Does not change the API, as
discussed on golang-dev.

E.g. on linux/amd64 with a directory of 65 files:

benchmark              old ns/op     new ns/op     delta
BenchmarkReaddir-4     67774         66225         -2.29%

benchmark              old allocs     new allocs     delta
BenchmarkReaddir-4     334            269            -19.46%

benchmark              old bytes     new bytes     delta
BenchmarkReaddir-4     25208         24168         -4.13%

Change-Id: I44ef72a04ad7055523a980f29aa11122040ae8fe
Reviewed-on: https://go-review.googlesource.com/16423
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-10-30 19:47:55 +00:00
Russ Cox
c007ce824d build: move package sources from src/pkg to src
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
2014-09-08 00:08:51 -04:00