- 09 Aug, 2013 24 commits
-
-
Carl Shapiro authored
This change makes the way cc constructs pointer maps closer to what gc does and is being done in preparation for changes to the internal content of the pointer map such as a change to distinguish interface pointers from ordinary pointers. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12692043
-
Pieter Droogendijk authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12541050
-
Brad Fitzpatrick authored
R=golang-dev, iant CC=golang-dev https://golang.org/cl/12580045
-
Dmitriy Vyukov authored
I've placed net.runtime_Semacquire into netpoll.goc, but netbsd does not yet use netpoll.goc. R=golang-dev, bradfitz, iant CC=golang-dev https://golang.org/cl/12699045
-
Dmitriy Vyukov authored
The mutex, fdMutex, handles locking and lifetime of sysfd, and serializes Read and Write methods. This allows to strip 2 sync.Mutex.Lock calls, 2 sync.Mutex.Unlock calls, 1 defer and some amount of misc overhead from every network operation. On linux/amd64, Intel E5-2690: benchmark old ns/op new ns/op delta BenchmarkTCP4Persistent 9595 9454 -1.47% BenchmarkTCP4Persistent-2 8978 8772 -2.29% BenchmarkTCP4ConcurrentReadWrite 4900 4625 -5.61% BenchmarkTCP4ConcurrentReadWrite-2 2603 2500 -3.96% In general it strips 70-500 ns from every network operation depending on processor model. On my relatively new E5-2690 it accounts to ~5% of network op cost. Fixes #6074. R=golang-dev, bradfitz, alex.brainman, iant, mikioh.mikioh CC=golang-dev https://golang.org/cl/12418043
-
Brad Fitzpatrick authored
The old code was caching per-type struct field info. Instead, cache type-specific encoding funcs, tailored for that particular type to avoid unnecessary reflection at runtime. Once the machine is built once, future encodings of that type just run the func. benchmark old ns/op new ns/op delta BenchmarkCodeEncoder 48424939 36975320 -23.64% benchmark old MB/s new MB/s speedup BenchmarkCodeEncoder 40.07 52.48 1.31x Additionally, the numbers seem stable now at ~52 MB/s, whereas the numbers for the old code were all over the place: 11 MB/s, 40 MB/s, 13 MB/s, 39 MB/s, etc. In the benchmark above I compared against the best I saw the old code do. R=rsc, adg CC=gobot, golang-dev, r https://golang.org/cl/9129044
-
Ian Lance Taylor authored
This should be more efficient everywhere, and appears to be required on Solaris. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12583046
-
Dominik Honnef authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12578044
-
Ian Lance Taylor authored
bug086.go:14:1: error: missing return at end of function R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12697043
-
Rob Pike authored
Sigh. R=golang-dev CC=golang-dev https://golang.org/cl/12491045
-
Rob Pike authored
Simple approach. Still generates garbage, but not as much. benchmark old ns/op new ns/op delta BenchmarkWriteSlice1000Int32s 40260 18791 -53.33% benchmark old MB/s new MB/s speedup BenchmarkWriteSlice1000Int32s 99.35 212.87 2.14x Fixes #2634. R=golang-dev, crawshaw CC=golang-dev https://golang.org/cl/12680046
-
Russ Cox authored
Fixes #5048. R=golang-dev, r CC=golang-dev https://golang.org/cl/12651044
-
Dmitriy Vyukov authored
Introduce freezetheworld function that is a best-effort attempt to stop any concurrently running goroutines. Call it during crash. Fixes #5873. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12054044
-
Rob Pike authored
It's a modest package with modest goals and limitations. Make that clear. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12694043
-
Rick Arnold authored
No longer continue assuming package main. Fixes #4776. R=golang-dev, r CC=golang-dev https://golang.org/cl/12677043
-
Pieter Droogendijk authored
Original CL by rsc (11916045): The motivation for disallowing them was RFC 4180 saying "The last field in the record must not be followed by a comma." I believe this is an admonition to CSV generators, not readers. When reading, anything followed by a comma is not the last field. Fixes #5892. R=golang-dev, rsc, r CC=golang-dev https://golang.org/cl/12294043
-
Rémy Oudompheng authored
Pseudo-instructions MOVBS and MOVHS are used to clarify the semantics of short integers vs. registers: * 8-bit and 16-bit values in registers are assumed to always be zero-extended or sign-extended depending on their type. * MOVB is truncation or move of an already extended value between registers. * MOVBU enforces zero-extension at the destination (register). * MOVBS enforces sign-extension at the destination (register). And similarly for MOVH/MOVS/MOVHU. The linker is adapted to assemble MOVB and MOVH to an ordinary mov. Also a peephole pass in 5g that aims at eliminating redundant zero/sign extensions is improved. encoding/binary: benchmark old ns/op new ns/op delta BenchmarkReadSlice1000Int32s 220387 217185 -1.45% BenchmarkReadStruct 12839 12910 +0.55% BenchmarkReadInts 5692 5534 -2.78% BenchmarkWriteInts 6137 6016 -1.97% BenchmarkPutUvarint32 257 241 -6.23% BenchmarkPutUvarint64 812 754 -7.14% benchmark old MB/s new MB/s speedup BenchmarkReadSlice1000Int32s 18.15 18.42 1.01x BenchmarkReadStruct 5.45 5.42 0.99x BenchmarkReadInts 5.27 5.42 1.03x BenchmarkWriteInts 4.89 4.99 1.02x BenchmarkPutUvarint32 15.56 16.57 1.06x BenchmarkPutUvarint64 9.85 10.60 1.08x crypto/des: benchmark old ns/op new ns/op delta BenchmarkEncrypt 7002 5169 -26.18% BenchmarkDecrypt 7015 5195 -25.94% benchmark old MB/s new MB/s speedup BenchmarkEncrypt 1.14 1.55 1.36x BenchmarkDecrypt 1.14 1.54 1.35x strconv: benchmark old ns/op new ns/op delta BenchmarkAtof64Decimal 457 385 -15.75% BenchmarkAtof64Float 574 479 -16.55% BenchmarkAtof64FloatExp 1035 906 -12.46% BenchmarkAtof64Big 1793 1457 -18.74% BenchmarkAtof64RandomBits 2267 2066 -8.87% BenchmarkAtof64RandomFloats 1416 1194 -15.68% BenchmarkAtof32Decimal 451 379 -15.96% BenchmarkAtof32Float 547 435 -20.48% BenchmarkAtof32FloatExp 1095 986 -9.95% BenchmarkAtof32Random 1154 1006 -12.82% BenchmarkAtoi 1415 1380 -2.47% BenchmarkAtoiNeg 1414 1401 -0.92% BenchmarkAtoi64 1744 1671 -4.19% BenchmarkAtoi64Neg 1737 1662 -4.32% Fixes #1837. R=rsc, dave, bradfitz CC=golang-dev https://golang.org/cl/12424043
-
Russ Cox authored
Fixes #6043. R=golang-dev, r CC=golang-dev https://golang.org/cl/12693043
-
Shivakumar GN authored
Fixes #6034. R=golang-dev, bradfitz, alex.brainman, dan.kortschak CC=golang-dev https://golang.org/cl/12311044
-
Rob Pike authored
By separating finding the end of the comment from the end of the action, we can diagnose malformed comments better. Also tweak the documentation to make the comment syntax clearer. Fixes #6022. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12570044
-
Russ Cox authored
g% 6c ~/x.c /Users/rsc/x.c:1 duplicate types given: STRUCT s and VOID /Users/rsc/x.c:1 no return at end of function: f g% Fixes #6083. R=ken2 CC=golang-dev https://golang.org/cl/12691043
-
Rob Pike authored
See issue 4949 for a full explanation. Allocs go from 1 to zero in the non-addressable case. Fixes #4949. BenchmarkInterfaceBig 90 14 -84.01% BenchmarkInterfaceSmall 14 14 +0.00% R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12646043
-
David Symonds authored
R=golang-dev, bradfitz CC=golang-dev, ryanslade https://golang.org/cl/12588044
-
Mikio Hara authored
Unlike the existing net package own pollster, runtime-integrated network pollster on BSD variants, actually kqueue, requires a socket that has beed passed to syscall.Listen previously for a stream listener. This CL separates pollDesc.Init of Unix network pollster from newFD to avoid any breakages in the transition from Unix network pollster to runtime-integrated pollster. Upcoming CLs will rearrange the call order of pollster and syscall functions like the following; - For dialers that open active connections, pollDesc.Init will be called in between syscall.Bind and syscall.Connect. - For stream listeners that open passive stream connections, pollDesc.Init will be called just after syscall.Listen. - For datagram listeners that open datagram connections, pollDesc.Init will be called just after syscall.Bind. This is in preparation for runtime-integrated network pollster for BSD variants. Update #5199 R=dvyukov, bradfitz CC=golang-dev https://golang.org/cl/12663043
-
- 08 Aug, 2013 16 commits
-
-
Volker Dobler authored
Having a trailing dot in the string doesn't really simplify the checking loop in isDomainName. Avoid this unnecessary allocation. Also make the valid domain names more explicit by adding some more test cases. benchmark old ns/op new ns/op delta BenchmarkDNSNames 2420.0 983.0 -59.38% benchmark old allocs new allocs delta BenchmarkDNSNames 12 0 -100.00% benchmark old bytes new bytes delta BenchmarkDNSNames 336 0 -100.00% R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12662043
-
Dominik Honnef authored
Renders code coverage as an overlay, replicating the look of the HTML that go tool cover produces. Also some cleanups. R=adonovan, bradfitz CC=golang-dev https://golang.org/cl/12684043
-
Brad Fitzpatrick authored
R=golang-dev, gri CC=golang-dev https://golang.org/cl/12603045
-
Rémy Oudompheng authored
MOVBS and MOVHS are defined as duplicates of MOVB and MOVH, and perform sign-extension moving. No change is made to code generation. Update #1837 R=rsc, bradfitz CC=golang-dev https://golang.org/cl/12682043
-
Robert Griesemer authored
- adjusted test files so that they actually type-check - adjusted go1.txt, go1.1.txt, next.txt - to run, provide build tag: api_tool Fixes #4538. R=bradfitz CC=golang-dev https://golang.org/cl/12300043
-
Brad Fitzpatrick authored
The ResponseWriter's ReadFrom method was causing side effects on the output before any data was read. Now, bail out early and do a normal copy (which does a read before writing) when our input and output are known to not to be the pair of types we need for sendfile. Fixes #5660 R=golang-dev, rsc, nightlyone CC=golang-dev https://golang.org/cl/12632043
-
Russ Cox authored
I moved the pointer block from one end of the frame to the other toward the end of working on the last CL, and of course that made the optimization no longer work. Now it works again: 0030 (bug361.go:12) DATA gclocals·0+0(SB)/4,$4 0030 (bug361.go:12) DATA gclocals·0+4(SB)/4,$3 0030 (bug361.go:12) GLOBL gclocals·0+0(SB),8,$8 Fixes arm build (this time for sure!). TBR=golang-dev CC=cshapiro, golang-dev, iant https://golang.org/cl/12627044
-
Russ Cox authored
Sort non-pointer-containing data to the low end of the stack frame, and make the bitmaps only cover the pointer-containing top end. Generates significantly less garbage collection bitmap for programs with large byte buffers on the stack. Only 2% shorter for godoc, but 99.99998% shorter in some test cases. Fixes arm build. TBR=golang-dev CC=cshapiro, golang-dev, iant https://golang.org/cl/12541047
-
Brad Fitzpatrick authored
We weren't seeing additions. (stuff to put in next.txt) R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12678043
-
Brad Fitzpatrick authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12519046
-
Brad Fitzpatrick authored
R=gri CC=golang-dev https://golang.org/cl/12639043
-
ChaiShushan authored
The receiver name is optional. when Method's receiver name messing, the functionList regex can't match the Method, e.g. `func (*T) ProtoMessage() {}`. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12530044
-
Dmitriy Vyukov authored
Fixes #5900. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12669043
-
Russ Cox authored
Individual variables bigger than 10 MB are now moved to the heap, as if they had escaped on their own. This avoids ridiculous stacks for programs that do things like x := [1<<30]byte{} ... use x ... If 10 MB is too small, we can raise the limit. Fixes #6077. R=ken2 CC=golang-dev https://golang.org/cl/12650045
-
Pieter Droogendijk authored
Readdir's result should never contain a nil. Fixes #5960. R=golang-dev, rsc, bradfitz CC=golang-dev https://golang.org/cl/12261043
-
Dmitriy Shelenin authored
Fixes #5334. R=golang-dev, dave, rsc CC=golang-dev https://golang.org/cl/8653047
-