1
0
mirror of https://github.com/golang/go synced 2024-11-22 02:24:41 -07:00
The Go programming language
Go to file
Kyle Consalus 4d903504b3 runtime: special case copy, equal for one-word interface values
Based on the observation that a great number of the types that
are copied or compared in interfaces, maps, and channels are
word-sized, this uses specialized copy and equality functions
for them that use a word instead of 4 or 8 bytes. Seems to yield
0-6% improvements in performance in the benchmarks I've run.
For example, with the regexp benchmarks:

Before:
regexp.BenchmarkLiteral   500000       3.26 µs/op
regexp.BenchmarkNotLiteral    100000      13.67 µs/op
regexp.BenchmarkMatchClass    100000      18.72 µs/op
regexp.BenchmarkMatchClass_InRange    100000      20.04 µs/op
regexp.BenchmarkReplaceAll    100000      27.85 µs/op

After:
regexp.BenchmarkLiteral   500000       3.11 µs/op
regexp.BenchmarkNotLiteral    200000      13.29 µs/op
regexp.BenchmarkMatchClass    100000      17.65 µs/op
regexp.BenchmarkMatchClass_InRange    100000      18.49 µs/op
regexp.BenchmarkReplaceAll    100000      26.34 µs/op

R=rsc
CC=golang-dev
https://golang.org/cl/1967047
2010-08-26 13:32:40 -04:00
bin build: $GOBIN defaults to $GOROOT/bin 2010-08-24 20:00:33 -04:00
doc doc/go_learning: add links to more German docs 2010-08-26 10:17:14 +10:00
include cov and prof: implement windows version (just function stubs and build mods) 2010-07-30 11:47:11 +10:00
lib codereview: really disable codereview when not available 2010-08-25 17:52:25 -04:00
misc build: no required environment variables 2010-08-18 10:08:49 -04:00
pkg more description 2009-10-15 23:08:46 -07:00
src runtime: special case copy, equal for one-word interface values 2010-08-26 13:32:40 -04:00
test test: Add testcase which crashes gccgo. 2010-08-24 13:08:05 -07:00
.hgignore .hgignore: ignore src/cmd/cc/y.output 2010-08-26 16:50:17 +10:00
.hgtags tag release.2010-08-25 2010-08-25 15:01:43 +10:00
AUTHORS A+C: Corey Thomasson (individual CLA) 2010-08-26 13:21:06 -04:00
CONTRIBUTORS A+C: Corey Thomasson (individual CLA) 2010-08-26 13:21:06 -04:00
favicon.ico add a favicon plus a couple of hi-res versions of gordon 2009-10-26 10:13:07 -07:00
LICENSE Add an explicit patent grant to the Go license. 2010-01-25 15:39:32 -08:00
README build: update, streamline documentation for new $GOBIN 2010-08-24 20:00:50 -04:00

This is the source code repository for the Go programming language.  

For documentation about how to install and use Go,
visit http://golang.org/ or load doc/install.html in your web browser.

After installing Go, you can view a nicely formatted
doc/install.html by running godoc --http=:6060
and then visiting http://localhost:6060/doc/install.html.

Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.

--

Binary Distribution Notes

If you have just untarred a binary Go distribution, you need to set
the environment variable $GOROOT to the full path of the go
directory (the one containing this README).  You can omit the
variable if you unpack it into /usr/local/go, or if you rebuild
from sources by running all.bash (see doc/install.html).
You should also add the Go binary directory $GOROOT/bin
to your shell's path.

For example, if you extracted the tar file into $HOME/go, you might
put the following in your .profile:

    export GOROOT=$HOME/go
    export PATH=$PATH:$GOROOT/bin

See doc/install.html for more details.