1
0
mirror of https://github.com/golang/go synced 2024-10-04 04:21:22 -06:00
Commit Graph

6362 Commits

Author SHA1 Message Date
Marcel van Lohuizen
21d94a22fe exp/locale/collate: switch from DUCET to CLDR for the default root table.
R=r
CC=golang-dev
https://golang.org/cl/6499079
2012-09-08 10:38:11 +09:00
Robert Griesemer
d4cdfcf3d9 text/scanner: skip first character if it's a BOM
R=r
CC=golang-dev
https://golang.org/cl/6493097
2012-09-07 17:15:42 -07:00
Robert Griesemer
2a391f467d go/scanner: add missing BOM test
R=r
CC=golang-dev
https://golang.org/cl/6498106
2012-09-07 16:28:15 -07:00
Robert Griesemer
d5ab44e2fe go/scanner: skip first character if it's a BOM
R=r
CC=golang-dev
https://golang.org/cl/6490095
2012-09-07 13:56:31 -07:00
Albert Strasheim
412c60f1fa syscall: Test SCM credentials on Linux.
This test was previously removed in 087c6e15702e.

R=bradfitz, rsc, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6506061
2012-09-07 10:31:17 -07:00
Lucio De Re
7e414a5b01 net,mime: Minor corrections to documentation comments.
R=r
CC=dsymonds, gobot, golang-dev
https://golang.org/cl/6495085
2012-09-07 10:24:55 -07:00
Dave Cheney
212ce41d00 runtime: arm: abort if hardware floating point missing
Fixes #3911.

Requires CL 6449127.

dfc@qnap:~$ ./runtime.test
runtime: this CPU has no floating point hardware, so it cannot run
this GOARM=7 binary. Recompile using GOARM=5.

R=rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6442109
2012-09-07 14:26:42 +10:00
Joel Sing
256cd7e78e syscall: regenerate/update netbsd z-files
Regenerate/update netbsd z-files on NetBSD 6.0 RC1.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6506062
2012-09-07 02:13:14 +10:00
Dave Cheney
67ee9a7db1 crypto/tls: fix data race on conn.err
Fixes #3862.

There were many areas where conn.err was being accessed
outside the mutex. This proposal moves the err value to
an embedded struct to make it more obvious when the error
value is being accessed.

As there are no Benchmark tests in this package I cannot
feel confident of the impact of this additional locking,
although most will be uncontended.

R=dvyukov, agl
CC=golang-dev
https://golang.org/cl/6497070
2012-09-06 17:50:26 +10:00
Marcel van Lohuizen
f0a31b5fc2 exp/locale/collate/build: moved some of the code to the appropriate file, as
promised in CL 13985.

R=r
CC=golang-dev
https://golang.org/cl/6503071
2012-09-06 13:16:02 +09:00
Nigel Tao
4bd8a38641 image/jpeg: fix quantization tables to be in zig-zag order, not natural
order.

JPEG images generated prior to this CL are still valid JPEGs, as the
quantization tables used are encoded in the wire format. Such JPEGs just
don't use the recommended quantization tables.

R=r, dsymonds, raph, adg
CC=golang-dev, tuom.larsen
https://golang.org/cl/6497083
2012-09-06 11:10:47 +10:00
Russ Cox
5e3224ce79 reflect: faster FieldByName, FieldByNameFunc
The old code was a depth first graph traversal that could, under the
right conditions, end up re-exploring the same subgraphs multiple
times, once for each way to arrive at that subgraph at a given depth.

The new code uses a breadth first search to make sure that it only
visits each reachable embedded struct once.

Also add fast path for the trivial case.

benchmark                old ns/op    new ns/op    delta
BenchmarkFieldByName1         1321          187  -85.84%
BenchmarkFieldByName2         6118         5186  -15.23%
BenchmarkFieldByName3      8218553        42112  -99.49%

R=gri, r
CC=golang-dev
https://golang.org/cl/6458090
2012-09-05 09:35:53 -04:00
Alan Donovan
ee911c4265 runtime: fix typo in openbsd-only symbol name.
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6490076
2012-09-04 16:35:05 -04:00
Sébastien Paolacci
2836c63459 net: fix {FileConn, FileListener, FilePacketConn} fd leak to child process.
All of them call `newFileFD' which must properly restore close-on-exec on
duplicated fds.

R=golang-dev, bradfitz, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6445081
2012-09-04 12:37:23 -07:00
Alan Donovan
532dee3842 runtime: discard SIGPROF delivered to non-Go threads.
Signal handlers are global resources but many language
environments (Go, C++ at Google, etc) assume they have sole
ownership of a particular handler.  Signal handlers in
mixed-language applications must therefore be robust against
unexpected delivery of certain signals, such as SIGPROF.

The default Go signal handler runtime·sigtramp assumes that it
will never be called on a non-Go thread, but this assumption
is violated by when linking in C++ code that spawns threads.
Specifically, the handler asserts the thread has an associated
"m" (Go scheduler).

This CL is a very simple workaround: discard SIGPROF delivered to non-Go threads.  runtime.badsignal(int32) now receives the signal number; if it returns without panicking (e.g. sig==SIGPROF) the signal is discarded.

I don't think there is any really satisfactory solution to the
problem of signal-based profiling in a mixed-language
application.  It's not only the issue of handler clobbering,
but also that a C++ SIGPROF handler called in a Go thread
can't unwind the Go stack (and vice versa).  The best we can
hope for is not crashing.

Note:
- I've ported this to all POSIX platforms, except ARM-linux which already ignores unexpected signals on m-less threads.
- I've avoided tail-calling runtime.badsignal because AFAICT the 6a/6l don't support it.
- I've avoided hoisting 'push sig' (common to both function calls) because it makes the code harder to read.
- Fixed an (apparently incorrect?) docstring.

R=iant, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6498057
2012-09-04 14:40:49 -04:00
Alan Donovan
b2458ff75c runtime/pprof: emit end-of-log marker at end of CPU profile.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6489065
2012-09-04 14:34:03 -04:00
Patrick Crosby
f4c22b29d4 net/http/pprof: updated documentation (run an http server)
Added instructions for starting an http server
to the godoc header for this package.  With the old
instructions, the example "go tool pprof..." commands
wouldn't work unless you happen to be running an http
server on port 6060 in your application.

R=golang-dev, minux.ma, adg, giacomo.tartari
CC=golang-dev
https://golang.org/cl/6483049
2012-09-04 11:27:20 +10:00
Alex Brainman
7f075ece42 runtime: increase stack frame during cgo call on windows/amd64
Fixes #3945.

R=golang-dev, minux.ma
CC=golang-dev, vcc.163
https://golang.org/cl/6490056
2012-09-03 12:12:51 +10:00
Russ Cox
a96c2b8c1a cmd/gc: fix PkgPath of byte, rune types
Fixes #3853.

R=ken2
CC=golang-dev
https://golang.org/cl/6492071
2012-09-01 19:55:55 -04:00
Rémy Oudompheng
c1c027964e strconv: faster FormatFloat for fixed number of digits.
The performance improvement applies to the case where
prec >= 0 and fmt is 'e' or 'g'.

Additional minor optimisations are included. A small
performance impact happens in some cases due to code
refactoring.

benchmark                              old ns/op    new ns/op    delta
BenchmarkAppendFloat64Fixed1                 623          235  -62.28%
BenchmarkAppendFloat64Fixed2                1050          272  -74.10%
BenchmarkAppendFloat64Fixed3                3723          243  -93.47%
BenchmarkAppendFloat64Fixed4               10285          274  -97.34%

BenchmarkAppendFloatDecimal                  190          206   +8.42%
BenchmarkAppendFloat                         387          377   -2.58%
BenchmarkAppendFloatExp                      397          339  -14.61%
BenchmarkAppendFloatNegExp                   377          336  -10.88%
BenchmarkAppendFloatBig                      546          482  -11.72%

BenchmarkAppendFloat32Integer                188          204   +8.51%
BenchmarkAppendFloat32ExactFraction          329          298   -9.42%
BenchmarkAppendFloat32Point                  400          372   -7.00%
BenchmarkAppendFloat32Exp                    369          306  -17.07%
BenchmarkAppendFloat32NegExp                 372          305  -18.01%

R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/6462049
2012-09-01 16:31:46 +02:00
Marcel van Lohuizen
5a78e5ea4c exp/locale/collate: Added functionality to parse and process LDML files
for both locale-specific exemplar characters and tailorings to
the collation table.
Some specifices:
- Moved stringSet to the beginning of the file and added some functionality
  to parse command line files.
- openReader now modifies the input URL for localFiles to guarantee that
  any http source listed in the generated file is indeed this source.
- Note that the implementation of the Tailoring API used by maketables.go
  is not yet checked in. So for now adding tailorings are simply no-ops.
- The generated file of exemplar characters will be used somewhere else.
  Here is a snippet of how the body of the generated file looks like:

type exemplarType int
const (
        exCharacters exemplarType = iota
        exContractions
        exPunctuation
        exAuxiliary
        exCurrency
        exIndex
        exN
)

var exemplarCharacters = map[string][exN]string{
        "af": [exN]string{
                0: "a á â b c d e é è ê ë f g h i î ï j k l m n o ô ö p q r s t u û v w x y z",
                3: "á à â ä ã æ ç é è ê ë í ì î ï ó ò ô ö ú ù û ü ý",
                4: "a b c d e f g h i j k l m n o p q r s t u v w x y z",
        },
        ...
}

R=r
CC=golang-dev
https://golang.org/cl/6501070
2012-09-01 14:15:00 +02:00
Marcel van Lohuizen
18aa55c169 exp/locale/collate: first changes that introduce implementation of tailorings:
- Elements in the array are now sorted as a linked list.  This makes it easier to
  apply tailorings.
- Added code to sort entries by collation elements.
- Added logical reset points.  This is used for tailoring relative to certain
  properties, rather than characters.

NOTE: all code for type entry should now be in order.go.  To keep the diffs for
this CL reasonable, though, the existing code is left in builder.go.  I'll move
this in a separate CL.

R=r
CC=golang-dev
https://golang.org/cl/6493063
2012-09-01 14:13:37 +02:00
Dave Cheney
dd79b330c9 syscall: add PtraceSyscall(pid int, signal int)
Fixes #3525.

PTRACE_SYSCALL behaves like PTRACE_CONT and can deliver
a signal to the process. Ideally PtraceSingleStep should
support the signal argument, but its interface is frozen
by Go1.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/6353051
2012-09-01 09:17:14 +10:00
Patrick Higgins
d168442708 net/http: added ParseTime function.
Parses a time header value into a time.Time according to rfc2616 sec 3.3.

R=golang-dev, dave, rsc, r
CC=bradfitz, golang-dev
https://golang.org/cl/6344046
2012-08-31 18:10:16 -04:00
Shawn Smith
a11b748fa2 encoding/xml: parse comments in DOCTYPE
R=rsc, n13m3y3r
CC=golang-dev
https://golang.org/cl/6330061
2012-08-31 18:09:31 -04:00
Ivan Krasin
5287175ad9 runtime: add vdso support for linux/amd64. Fixes issue 1933.
R=iant, imkrasin, krasin, iant, minux.ma, rsc, nigeltao, r, fullung
CC=golang-dev
https://golang.org/cl/6454046
2012-08-31 18:07:04 -04:00
Alexandru Moșoi
3efc482190 net/rpc/jsonrpc: handles missing "params" in jsonrpc.
A crash happens in the first request in a connection
if "params" field is missing because c.req.Params is Nil.

Fixes #3848.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6446051
2012-08-31 15:52:27 -04:00
Russ Cox
020c6558d9 runtime/pprof: restore articles in type doc comments
Reverts part of CL 6460082.

If a doc comment describes a type by explaining the
meaning of one instance of the type, a leading article
is fine and makes the text less awkward.

Compare:
// A dog is a kind of animal.
// Dog is a kind of animal.

R=golang-dev, dsymonds, dvyukov, r
CC=golang-dev
https://golang.org/cl/6494066
2012-08-31 13:49:57 -04:00
Akshat Kumar
a72bebf6e1 src: Add support for 64-bit version of Plan 9
This set of changes extends the Plan 9 support
to include the AMD64 architecture and should
work on all versions of Plan 9.

R=golang-dev, rminnich, noah.evans, rsc, minux.ma, npe
CC=akskuma, golang-dev, jfflore, noah.evans
https://golang.org/cl/6479052
2012-08-31 13:21:13 -04:00
Russ Cox
e29659b3c3 net/http: add (*ServeMux).Handler method
The Handler method makes the ServeMux dispatch logic
available to wrappers that enforce additional constraints
on requests.

R=golang-dev, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/6450165
2012-08-31 12:16:31 -04:00
Christian Himpel
db7dbe32aa net/http: fix inserting of implicit redirects in serve mux
In serve mux, if pattern contains a host name, pass only the path to
the redirect handler.

Add tests for serve mux redirections.

R=rsc
CC=bradfitz, gobot, golang-dev
https://golang.org/cl/6329045
2012-08-31 12:00:01 -04:00
Nigel Tao
13cf2473b8 exp/html: change a node's children from a slice to a linked list.
Also rename Node.{Add,Remove} to Node.{AppendChild,RemoveChild} to
be consistent with the DOM.

benchmark                      old ns/op    new ns/op    delta
BenchmarkParser                  4042040      3749618   -7.23%

benchmark                       old MB/s     new MB/s  speedup
BenchmarkParser                    19.34        20.85    1.08x

BenchmarkParser mallocs per iteration is also:
10495 before / 7992 after

R=andybalholm, r, adg
CC=golang-dev
https://golang.org/cl/6495061
2012-08-31 10:00:12 +10:00
Robert Griesemer
d6c69dc602 go/scanner: don't print garbage if there's no error
R=r
CC=golang-dev
https://golang.org/cl/6489059
2012-08-30 16:10:33 -07:00
Rob Pike
363ec80dec cmd/gc: string conversion for surrogates
This is required by the spec to produce the replacement char.
The fix lies in lib9's rune code.

R=golang-dev, nigeltao, rsc
CC=golang-dev
https://golang.org/cl/6443109
2012-08-30 11:16:55 -07:00
Rob Pike
b7627d3d1f path: improve documentation for Dir
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6495059
2012-08-30 11:16:41 -07:00
Dmitriy Vyukov
e61c047c3e net/rpc: protect serviceMap with RWMutex
R=r, r
CC=golang-dev
https://golang.org/cl/6494044
2012-08-30 20:32:32 +04:00
Rob Pike
de13e8dccd text/template: make spaces significant
Other than catching an error case that was missed before, this
CL introduces no changes to the template language or API.

For simplicity, templates use spaces as argument separators.
This means that spaces are significant: .x .y is not the same as .x.y.
In the existing code, these cases are discriminated by the lexer,
but that means for instance that (a b).x cannot be distinguished
from (a b) .x, which is lousy. Although that syntax is not
supported yet, we want to support it and this CL is a necessary
step.

This CL emits a "space" token (actually a run of spaces) from
the lexer so the parser can discriminate these cases. It therefore
fixes a couple of undisclosed bugs ("hi".x is now an error) but
doesn't otherwise change the language. Later CLs will amend
the grammar to make .X a proper operator.

There is one unpleasantness: With space a token, three-token
lookahead is now required when parsing variable declarations
to discriminate them from plain variable references. Otherwise
the change isn't bad.

The CL also moves the debugging print code out of the lexer
into the test, which is the only place it's needed or useful.

Step towards resolving issue 3999.
It still remains to move field chaining out of the lexer
and into the parser and make field access an operator.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6492054
2012-08-29 21:42:53 -07:00
Shenghou Ma
f78ead3ca4 syscall: extract an ExampleLoadLibrary from comment
while we are at it, fix some out-of-date comments.

R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/6498054
2012-08-29 21:44:46 +08:00
Dave Cheney
f8d4bb884f net/http/httputil: fix race in DumpRequestOut
Fixes #3892.

Swapping the order of the writers inside the MultiWriter ensures
the request will be written to buf before http.ReadRequest completes.

The fencedBuffer is not required to make the test pass on
any machine that I have access too, but as the buf is shared
across goroutines, I think it is necessary for correctness.

R=bradfitz, fullung, franciscossouza
CC=golang-dev
https://golang.org/cl/6483061
2012-08-29 09:05:30 +10:00
Mikio Hara
ddbc85ce48 net: delete unused socket-level option helpers
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6499043
2012-08-29 06:54:00 +09:00
Christopher Swenson
baf426f10f math/big: Replace RCLQ + ANDQ with SETCS in unrolled arithmetic assembly.
benchmark             old ns/op    new ns/op    delta
BenchmarkAddVW_1              8            8   +0.60%
BenchmarkAddVW_2             10            9   -8.64%
BenchmarkAddVW_3             10           10   -4.63%
BenchmarkAddVW_4             10           11   +3.67%
BenchmarkAddVW_5             11           12   +5.98%
BenchmarkAddVW_1e1           18           20   +6.38%
BenchmarkAddVW_1e2          129          115  -10.85%
BenchmarkAddVW_1e3         1270         1089  -14.25%
BenchmarkAddVW_1e4        13376        12145   -9.20%
BenchmarkAddVW_1e5       130392       125260   -3.94%

benchmark              old MB/s     new MB/s  speedup
BenchmarkAddVW_1        7709.10      7661.92    0.99x
BenchmarkAddVW_2       12451.10     13604.00    1.09x
BenchmarkAddVW_3       17727.81     18721.54    1.06x
BenchmarkAddVW_4       23552.64     22708.81    0.96x
BenchmarkAddVW_5       27411.40     25816.22    0.94x
BenchmarkAddVW_1e1     34063.19     32023.06    0.94x
BenchmarkAddVW_1e2     49529.97     55360.55    1.12x
BenchmarkAddVW_1e3     50380.44     58764.18    1.17x
BenchmarkAddVW_1e4     47843.59     52696.10    1.10x
BenchmarkAddVW_1e5     49082.60     51093.66    1.04x

R=gri, rsc, r
CC=golang-dev
https://golang.org/cl/6480063
2012-08-28 09:29:45 -07:00
Brad Fitzpatrick
49f29c9c22 net/http: send an explicit zero Content-Length when Handler never Writes
Fixes #4004

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6472055
2012-08-26 11:17:55 -07:00
Joel Sing
79473d6b1c runtime: use netbsd signal ABI v2
Use version 2 of the NetBSD signal ABI - both version 2 and version 3
are supported by the kernel, with near identical behaviour. However,
the netbsd32 compat code does not allow version 3 to be used, which
prevents Go netbsd/386 binaries from running in compat mode on a
NetBSD amd64 kernel. Switch to version 2 of the ABI, which is the
same version currently used by NetBSD's libc.

R=minux.ma
CC=golang-dev
https://golang.org/cl/6476068
2012-08-26 20:57:47 +10:00
Robert Griesemer
74c6325142 math/big: fix broken comment
R=iant, iant
CC=golang-dev
https://golang.org/cl/6485064
2012-08-24 13:50:09 -07:00
Rob Pike
8b23066239 text/template: catch (A).X as a parse error
This shouldn't be an error (see issue 3999), but until it's handled
correctly, treat it as one to avoid confusion. Without this CL,
(A).X parses as two arguments.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6473059
2012-08-24 13:00:24 -07:00
Rob Pike
cc842c738e text/template: allow grouping of pipelines using parentheses
Based on work by Russ Cox. From his CL:

        This is generally useful but especially helpful when trying
        to use the built-in boolean operators.  It lets you write:

        {{if not (f 1)}} foo {{end}}
        {{if and (f 1) (g 2)}} bar {{end}}
        {{if or (f 1) (g 2)}} quux {{end}}

        instead of

        {{if f 1 | not}} foo {{end}}
        {{if f 1}}{{if g 2}} bar {{end}}{{end}}
        {{$do := 0}}{{if f 1}}{{$do := 1}}{{else if g 2}}{{$do := 1}}{{end}}{{if $do}} quux {{end}}

The result can be a bit LISPy but the benefit in expressiveness and readability
for such a small change justifies it.

I believe no changes are required to html/template.

Fixes #3276.

R=golang-dev, adg, rogpeppe, minux.ma
CC=golang-dev
https://golang.org/cl/6482056
2012-08-24 12:37:23 -07:00
Robert Griesemer
3bd8684fac math/big: minor tweaks to assembly code (slightly better performance)
Benchmarks run on 2.8GHz Quad-Code Intel Xeon,
4GB 800MHz DDR2 FB-DIMM ("PowerMac").

benchmark             old ns/op    new ns/op    delta
BenchmarkAddVV_1              7            7   -0.82%
BenchmarkAddVV_2              8            8   -3.46%
BenchmarkAddVV_3             10            9   -4.81%
BenchmarkAddVV_4              9            9   -1.89%
BenchmarkAddVV_5             11           10   -5.22%
BenchmarkAddVV_1e1           17           18   +4.05%
BenchmarkAddVV_1e2          117          115   -1.71%
BenchmarkAddVV_1e3         1095         1090   -0.46%
BenchmarkAddVV_1e4        13149        12679   -3.57%
BenchmarkAddVV_1e5       135133       129482   -4.18%
BenchmarkAddVW_1              6            6   -1.14%
BenchmarkAddVW_2              7            7   +3.78%
BenchmarkAddVW_3              8            8   +0.12%
BenchmarkAddVW_4              8            8   -6.52%
BenchmarkAddVW_5              9            8   -3.70%
BenchmarkAddVW_1e1           14           13   -4.29%
BenchmarkAddVW_1e2           97           96   -1.33%
BenchmarkAddVW_1e3          953          940   -1.36%
BenchmarkAddVW_1e4         9776         9527   -2.55%
BenchmarkAddVW_1e5       102396        97738   -4.55%

benchmark              old MB/s     new MB/s  speedup
BenchmarkAddVV_1        8702.84      8774.56    1.01x
BenchmarkAddVV_2       14739.60     15277.82    1.04x
BenchmarkAddVV_3       18375.37     19398.16    1.06x
BenchmarkAddVV_4       26935.44     27464.68    1.02x
BenchmarkAddVV_5       27754.04     29423.30    1.06x
BenchmarkAddVV_1e1     37050.89     35629.72    0.96x
BenchmarkAddVV_1e2     54289.15     55533.24    1.02x
BenchmarkAddVV_1e3     58428.83     58682.53    1.00x
BenchmarkAddVV_1e4     48670.55     50475.99    1.04x
BenchmarkAddVV_1e5     47360.54     49427.66    1.04x
BenchmarkAddVW_1       10397.27     10502.23    1.01x
BenchmarkAddVW_2       17279.03     16654.13    0.96x
BenchmarkAddVW_3       23858.39     23825.89    1.00x
BenchmarkAddVW_4       29799.42     31895.06    1.07x
BenchmarkAddVW_5       34781.83     36105.11    1.04x
BenchmarkAddVW_1e1     45629.88     47597.42    1.04x
BenchmarkAddVW_1e2     65341.93     66240.04    1.01x
BenchmarkAddVW_1e3     67153.67     68069.83    1.01x
BenchmarkAddVW_1e4     65464.60     67173.83    1.03x
BenchmarkAddVW_1e5     62501.88     65480.66    1.05x

R=iant
CC=golang-dev
https://golang.org/cl/6484056
2012-08-24 10:51:39 -07:00
Robert Griesemer
35422bc11f math/big: faster (add|sub)V(V|W) routines
Benchmarks run on 3.06GHz Intel Core 2 Duo,
4GB 800MHz DDR2 SDRAM ("iMac").

benchmark             old ns/op    new ns/op    delta
BenchmarkAddVV_1              6            6   +2.75%
BenchmarkAddVV_2              9            7  -19.71%
BenchmarkAddVV_3              9            9   +2.25%
BenchmarkAddVV_4             10            8  -20.46%
BenchmarkAddVV_5             12           10  -19.53%
BenchmarkAddVV_1e1           23           15  -32.48%
BenchmarkAddVV_1e2          213          107  -49.77%
BenchmarkAddVV_1e3         2088          993  -52.44%
BenchmarkAddVV_1e4        20874        12027  -42.38%
BenchmarkAddVV_1e5       209858       121480  -42.11%
BenchmarkAddVW_1              5            5   +0.90%
BenchmarkAddVW_2             11           11   -3.51%
BenchmarkAddVW_3              7            7   -0.27%
BenchmarkAddVW_4              8            7   -6.32%
BenchmarkAddVW_5              9            8  -10.89%
BenchmarkAddVW_1e1           17           12  -26.01%
BenchmarkAddVW_1e2          155           89  -42.32%
BenchmarkAddVW_1e3         1479          873  -40.97%
BenchmarkAddVW_1e4        13838         8764  -36.67%
BenchmarkAddVW_1e5       147353        89560  -39.22%

benchmark              old MB/s     new MB/s  speedup
BenchmarkAddVV_1        9765.57      9508.55    0.97x
BenchmarkAddVV_2       13077.63     16284.97    1.25x
BenchmarkAddVV_3       20599.58     20156.67    0.98x
BenchmarkAddVV_4       23591.58     29516.02    1.25x
BenchmarkAddVV_5       24920.95     31194.10    1.25x
BenchmarkAddVV_1e1     27393.76     40621.71    1.48x
BenchmarkAddVV_1e2     29911.96     59592.99    1.99x
BenchmarkAddVV_1e3     30650.73     64429.84    2.10x
BenchmarkAddVV_1e4     30660.09     53213.08    1.74x
BenchmarkAddVV_1e5     30496.74     52683.46    1.73x
BenchmarkAddVW_1       11503.39     11405.98    0.99x
BenchmarkAddVW_2       11203.56     11586.92    1.03x
BenchmarkAddVW_3       26173.45     26224.75    1.00x
BenchmarkAddVW_4       30560.30     32621.94    1.07x
BenchmarkAddVW_5       33183.81     37269.94    1.12x
BenchmarkAddVW_1e1     36991.75     50098.53    1.35x
BenchmarkAddVW_1e2     41087.14     71549.93    1.74x
BenchmarkAddVW_1e3     43266.42     73279.83    1.69x
BenchmarkAddVW_1e4     46246.74     73021.97    1.58x
BenchmarkAddVW_1e5     43433.00     71459.96    1.65x

Benchmarks run on 2.8GHz Quad-Code Intel Xeon,
4GB 800MHz DDR2 FB-DIMM ("PowerMac").

benchmark             old ns/op    new ns/op    delta
BenchmarkAddVV_1              7            7   +2.51%
BenchmarkAddVV_2              8            8   +3.70%
BenchmarkAddVV_3             10           10   +4.00%
BenchmarkAddVV_4             11            9  -19.49%
BenchmarkAddVV_5             14           11  -18.44%
BenchmarkAddVV_1e1           23           17  -27.00%
BenchmarkAddVV_1e2          234          117  -50.00%
BenchmarkAddVV_1e3         2284         1095  -52.06%
BenchmarkAddVV_1e4        22906        13149  -42.60%
BenchmarkAddVV_1e5       229860       135133  -41.21%
BenchmarkAddVW_1              6            6   +1.15%
BenchmarkAddVW_2              7            7   +1.37%
BenchmarkAddVW_3              7            8   +1.00%
BenchmarkAddVW_4              9            8   -6.93%
BenchmarkAddVW_5             10            9  -13.21%
BenchmarkAddVW_1e1           18           14  -24.32%
BenchmarkAddVW_1e2          170           97  -42.41%
BenchmarkAddVW_1e3         1619          953  -41.14%
BenchmarkAddVW_1e4        15142         9776  -35.44%
BenchmarkAddVW_1e5       160835       102396  -36.33%

benchmark              old MB/s     new MB/s  speedup
BenchmarkAddVV_1        8928.95      8702.84    0.97x
BenchmarkAddVV_2       15298.84     14739.60    0.96x
BenchmarkAddVV_3       19116.52     18375.37    0.96x
BenchmarkAddVV_4       21644.30     26935.44    1.24x
BenchmarkAddVV_5       22771.64     27754.04    1.22x
BenchmarkAddVV_1e1     27017.62     37050.89    1.37x
BenchmarkAddVV_1e2     27326.09     54289.15    1.99x
BenchmarkAddVV_1e3     28016.84     58428.83    2.09x
BenchmarkAddVV_1e4     27939.38     48670.55    1.74x
BenchmarkAddVV_1e5     27843.00     47360.54    1.70x
BenchmarkAddVW_1       10510.97     10397.27    0.99x
BenchmarkAddVW_2       17499.71     17279.03    0.99x
BenchmarkAddVW_3       24093.93     23858.39    0.99x
BenchmarkAddVW_4       27733.08     29799.42    1.07x
BenchmarkAddVW_5       30267.17     34781.83    1.15x
BenchmarkAddVW_1e1     34566.78     45629.88    1.32x
BenchmarkAddVW_1e2     37521.89     65341.93    1.74x
BenchmarkAddVW_1e3     39513.18     67153.67    1.70x
BenchmarkAddVW_1e4     42263.80     65464.60    1.55x
BenchmarkAddVW_1e5     39792.21     62501.88    1.57x

R=iant, remyoudompheng, nightlyone, minux.ma
CC=golang-dev
https://golang.org/cl/6482062
2012-08-24 09:20:44 -07:00
Marcel van Lohuizen
c61a185f35 exp/locale/collate: add code to ignore tests with (unpaired) surrogates.
In the regtest data, surrogates are assigned primary weights based on
the surrogate code point value.  Go now converts surrogates to FFFD, however,
meaning that the primary weight is based on this code point instead.
This change drops tests with surrogates and lets the tests pass.

R=r
CC=golang-dev
https://golang.org/cl/6461100
2012-08-24 15:56:07 +02:00
Dmitriy Vyukov
75af013229 net/http: add parallel client/server benchmark
R=bradfitz@golang.org

R=bradfitz
CC=bradfitz, dave, dsymonds, gobot, golang-dev
https://golang.org/cl/6441134
2012-08-24 14:19:49 +04:00