1
0
mirror of https://github.com/golang/go synced 2024-11-12 13:40:21 -07:00
Commit Graph

137 Commits

Author SHA1 Message Date
Russ Cox
6e8875551a test/bench/go1: first draft of Go 1 benchmark suite
I have included a few important microbenchmarks,
but the overall intent is to have mostly end-to-end
benchmarks timing real world operations.

The jsondata.go file is a summary of agl's
activity in various open source repositories.
It gets used as test data for many of the benchmarks.

Everything links into one binary (even the test data)
so that it is easy to run the benchmarks on many
computers: there is just one file to copy around.

R=golang-dev, r, bradfitz, adg, r
CC=golang-dev
https://golang.org/cl/5484071
2011-12-15 12:32:59 -05:00
Russ Cox
5fe96c640a test/garbage: move to test/bench/garbage
(These are benchmarks for the garbage collector, not tests.)

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5484070
2011-12-13 18:02:49 -05:00
Russ Cox
1161e1172b fix build, sorry
TBR=r
CC=golang-dev
https://golang.org/cl/5488066
2011-12-13 17:53:00 -05:00
Russ Cox
bcbb2f93ee test/bench: move to test/bench/shootout
R=golang-dev, r, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5487067
2011-12-13 17:46:54 -05:00
Rob Pike
f9489bed72 renaming_4: gofix -r everything/but/src/pkg
R=rsc
CC=golang-dev
https://golang.org/cl/5338043
2011-11-08 15:43:02 -08:00
Rob Pike
ae03a192e0 timing.log: significant improvements after custom algorithms
See https://golang.org/cl/4815087

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/4849050
2011-08-10 15:45:37 +10:00
Rob Pike
6fe82e6b96 test/bench: note changes after recent improvements to locking and runtime
Some tests are significantly faster (50%), a few are slower (up to 30%).
Fannkuch is confusing: parallel code is a little slower for gc, non-parallel and all gccgo runs are faster.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4830058
2011-08-04 11:29:20 +10:00
Rob Pike
5236814edd timing: update numbers for regex-dna
After improved compilation of append, regexps improve and regex-dna is 35% faster.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4518062
2011-05-13 10:58:41 -07:00
Rob Pike
e3634aad9d test/bench: update timings; moving to new machine.
Interesting comparisons between old and new machine,
and relationship between gccgo and gc.

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4430045
2011-04-18 09:50:20 -07:00
Alex Brainman
776fd72579 test/bench: enable build and test on Windows
R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4366043
2011-04-08 10:43:25 +10:00
Dave Cheney
49a4d7dc39 build: simplify clean.bash
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4257045
2011-03-02 14:57:47 -05:00
Rob Pike
65ece70812 test/bench: update timings for new GC
Some significant improvements; e.g. pidigits goes from 8.33 to 6.37

Also add gccgo for regex-dna.

R=rsc
CC=golang-dev
https://golang.org/cl/4160056
2011-02-16 10:46:29 -08:00
Rob Pike
aa78cec69c test/bench: update numbers for regex-dna after speedup to regexp
R=rsc
CC=golang-dev
https://golang.org/cl/3634042
2010-12-16 12:38:14 -08:00
Anthony Martin
85f5bb8216 test/bench: a couple fixes to timing.sh
- Skip the gccgo tests if we don't have it
- Add -lm so nbody.c will compile
- Pass 2098 to the meteor test (cf. the shootout site)

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/3619042
2010-12-15 09:47:13 -05:00
Kyle Consalus
009aebdba8 Removed bytes.Add and bytes.AddByte; we now have 'append'.
Changed all uses of bytes.Add (aside from those testing bytes.Add) to append(a, b...).
Also ran "gofmt -s" and made use of copy([]byte, string) in the fasta benchmark.

R=golang-dev, r, r2
CC=golang-dev
https://golang.org/cl/3302042
2010-12-01 11:59:13 -08:00
Evan Shaw
5bf420f0c8 pidigits: Remove TODO, minor improvements
I tried adding a Scale method to big.Int and it didn't make any noticeable
difference, so I'm removing my TODO.

Also got rid of a few obvious allocations that I missed earlier for a modest
improvement (~5%).

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/2711043
2010-10-30 20:16:44 -07:00
Rob Pike
f57f8b6f68 test/bench: update numbers
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/2631041
2010-10-20 17:43:57 -07:00
Russ Cox
2ee420fa5e ... changes
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/2273042
2010-09-24 11:55:48 -04:00
Christian Himpel
5c603dbb75 build: remove unnecessary references to GOBIN and GOROOT
All scripts and makefiles assume that GOBIN is correctly set
in PATH.

R=rsc
CC=golang-dev
https://golang.org/cl/2043041
2010-08-30 15:40:56 -04:00
Russ Cox
da392d9136 build: no required environment variables
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
2010-08-18 10:08:49 -04:00
Rob Pike
d31ee536e8 update the tree to use the new regexp methods
R=rsc
CC=golang-dev
https://golang.org/cl/1983043
2010-08-12 16:48:41 +10:00
Kyle Consalus
47bc1f2e4b Added regex-dna-parallel.go, a pretty trivial parallelization.
R=rsc, r
CC=golang-dev
https://golang.org/cl/972046
2010-06-03 16:20:54 -07:00
Robert Griesemer
b9caa4ac56 big: completed set of Int division routines & cleanups
- renamed Len -> BitLen, simplified implementation
- renamed old Div, Mod, DivMod -> Que, Rem, QuoRem
- implemented Div, Mod, DivMod (Euclidian definition, more
  useful in a mathematical context)
- fixed a bug in Exp (-0 was possible)
- added extra tests to check normalized results everywhere
- uniformly set Int.neg flag at the end of computations
- minor cosmetic cleanups
- ran all tests

R=rsc
CC=golang-dev
https://golang.org/cl/1091041
2010-05-03 18:48:05 -07:00
Russ Cox
f8f83e80b1 test/bench: import new fasta C reference, update Go, optimizations
OLD fasta -n 25000000
	gcc -O2 fasta.c	7.59u 0.06s 7.74r
	gc fasta	9.54u 0.15s 9.84r
	gc_B fasta	9.48u 0.10s 9.62r

NEW fasta -n 25000000
	gcc -O2 fasta.c	2.59u 0.02s 2.66r
	gc fasta	3.00u 0.03s 3.09r
	gc_B fasta	2.72u 0.03s 2.81r

R=r
CC=golang-dev
https://golang.org/cl/1054041
2010-05-03 17:47:59 -07:00
Robert Griesemer
58e77990ba big: use fast shift routines
- fixed a couple of bugs in the process
  (shift right was incorrect for negative numbers)
- added more tests and made some tests more robust
- changed pidigits back to using shifts to multiply
  by 2 instead of add

  This improves pidigit -s -n 10000 by approx. 5%:

  user 0m6.496s (old)
  user 0m6.156s (new)

R=rsc
CC=golang-dev
https://golang.org/cl/963044
2010-04-30 21:25:48 -07:00
Robert Griesemer
2f480b10e2 pidigits: ~10% performance win by using adds instead of shifts
user time for pidigits -s -n=10000:
6.466s w/ adds
7.138s w/ shifts

R=rsc
CC=golang-dev
https://golang.org/cl/1021041
2010-04-27 14:06:53 -07:00
Kyle Consalus
8b9a73f6a1 Added fannkuch-parallel.go
R=r, rsc
CC=golang-dev
https://golang.org/cl/978042
2010-04-26 22:44:44 -07:00
Rob Pike
735db765fb test/bench: reenable chameneosredux for gccgo.
run reverse-complement only once. (garbage is no longer an issue)

R=rsc
CC=golang-dev
https://golang.org/cl/968041
2010-04-21 14:54:19 -07:00
Evan Shaw
76cbbc8a95 big: Add Lsh and Value; convert pidigits to use big
This yields a pretty significant performance boost to pidigits and there are still some improvements to be made. Here are my numbers:

amd64 w/ bignum:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.10u 0.00s 2.10r
        gc pidigits     22.92u 0.02s 22.97r
        gc_B pidigits   22.62u 0.00s 22.65r

amd64 w/ big:
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

386 w/ bignum:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.00s 2.09r
        gc pidigits     44.30u 0.01s 44.35r
        gc_B pidigits   44.29u 0.03s 44.35r

386 w/ big:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.10u 0.00s 2.10r
        gc pidigits     22.70u 0.06s 22.79r
        gc_B pidigits   22.80u 0.09s 22.91r

R=rsc, gri
CC=golang-dev
https://golang.org/cl/881050
2010-04-20 20:39:36 -07:00
Kyle Consalus
edcd70e07a test/bench: add k-nucleotide-parallel
R=rsc
CC=golang-dev
https://golang.org/cl/881042
2010-04-05 22:32:36 -07:00
Russ Cox
c7122a3c58 simplify various code using new map index rule
R=r
CC=golang-dev
https://golang.org/cl/833044
2010-03-30 10:51:11 -07:00
Russ Cox
9750adbbad strings: delete Runes, Bytes
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench
gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench
delete unused imports

R=r
CC=golang-dev
https://golang.org/cl/224062
2010-02-25 16:01:29 -08:00
Rob Pike
d2fc5d68da Change type of Printf's args to ... interface{}
R=rsc
CC=golang-dev
https://golang.org/cl/197043
2010-02-02 10:53:37 +11:00
Rob Pike
7a5852b50e update timing logs for benchmarks.
some significant improvements:
	reverse-complement
	nbody (gccgo only)
	regex-dna
	pidigits
one mysterious drop:
	binary-tree.go (gccgo only)

R=rsc
CC=golang-dev
https://golang.org/cl/181158
2010-01-06 19:36:28 -08:00
Robert Griesemer
45ca9f7a9e 1) Change default gofmt default settings for
parsing and printing to new syntax.

   Use -oldparser to parse the old syntax,
   use -oldprinter to print the old syntax.

2) Change default gofmt formatting settings
   to use tabs for indentation only and to use
   spaces for alignment. This will make the code
   alignment insensitive to an editor's tabwidth.

   Use -spaces=false to use tabs for alignment.

3) Manually changed src/exp/parser/parser_test.go
   so that it doesn't try to parse the parser's
   source files using the old syntax (they have
   new syntax now).

4) gofmt -w src misc test/bench

5th and last set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/180050
2009-12-15 15:41:46 -08:00
Devon H. O'Dell
857d4cf1a9 Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/src
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.

R=rsc
CC=golang-dev
https://golang.org/cl/171044
2009-12-11 15:14:09 -08:00
Robert Griesemer
5f5dcfbc15 - gofmt these files
- remove use of implicit string concatenation
- these appear to be the only files correctly compiling under test
  that used implicit string concatenation

R=rsc
https://golang.org/cl/172043
2009-12-09 16:55:03 -08:00
Russ Cox
86c0c54d27 test/bench: faster fasta (mostly due to bufio fix)
R=r
https://golang.org/cl/165083
2009-12-07 19:39:09 -08:00
Roger Peppe
ea98e4b5e9 changes necessary to get the new chameneosredux onto shootout.alioth.debian.org .
it's now there: http://shootout.alioth.debian.org/u32q/benchmark.php?test=chameneosredux&lang=all&box=1!

R=r, rsc
CC=golang-dev
https://golang.org/cl/167043
2009-12-07 10:06:51 -08:00
Russ Cox
864c6bcbc7 test/bench: use range in reverse-complement
1.9s	gcc reverse-complement.c

reverse-complement.go
4.5s / 3.5s	original, with/without bounds checks
3.5s / 3.3s	bounds check reduction
3.3s / 2.8s	smarter garbage collector
2.6s / 2.3s	assembler bytes.IndexByte
2.5s / 2.1s	even smarter garbage collector
2.3s / 2.1s	fix optimizer unnecessary spill bug
2.0s / 1.9s	change loop to range (this CL)

R=r
https://golang.org/cl/166072
2009-12-04 21:44:29 -08:00
Russ Cox
e2b23e42a8 test/bench: dead code in reverse-complement
R=r
https://golang.org/cl/165065
2009-12-04 19:25:25 -08:00
Rob Pike
b0683bd77a move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.
this breaks the dependency of package io on package bytes.

R=rsc
CC=golang-dev
https://golang.org/cl/163085
2009-12-02 22:02:14 -08:00
Roger Peppe
99d0c3d85d change command-line argument to be
unnamed, not require -n, in line with other
entries.

R=rsc
CC=r
https://golang.org/cl/162061
2009-11-30 15:16:40 -08:00
Rob Pike
eb33c0bb35 timing log update for new version of chameneos
R=rsc
CC=golang-dev, rog
https://golang.org/cl/160054
2009-11-24 14:19:43 -08:00
Roger Peppe
9f17353250 chameneosredux test modified, bug fixed, faster
based on suggestion from arvindht@gmail.com

R=r, rsc, r1
https://golang.org/cl/157091
2009-11-24 11:45:30 -08:00
Sergio Luis O. B. Correia
6fc820729e go: makes it build for the case $GOROOT has whitespaces
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes #115.

R=rsc, dsymonds1
https://golang.org/cl/157067
2009-11-23 17:32:51 -08:00
Russ Cox
19dae0799b gofmt -r 'α[β:len(α)] -> α[β:]' -w test/bench
except chameneosredux which i know is being edited

require gofmt for test/bench

R=r
https://golang.org/cl/157110
2009-11-20 13:11:42 -08:00
Russ Cox
688ffc1dc1 test/bench revisions;
* reverse-complement: port C algorithm to Go
	saves 30% on my MacBook Pro and makes it a fairer comparison.
  * test reverse-complement with and without GC (another 15%)
  * revise timing.sh to work on more systems
  * avoid two glibcisms in fasta.c

R=r
https://golang.org/cl/156110
2009-11-20 08:59:11 -08:00
Rob Pike
e70cedfaec remove bytes.Copy
replace all calls with calls to copy
use copy in regexp and bytes.Buffer

R=rsc
CC=golang-dev
https://golang.org/cl/157073
2009-11-18 15:24:24 -08:00
Rob Pike
0263103a05 move evaluation of null-matching instructions one iteration earlier.
performance hit of about 20% but more intuitive results for submatches.
we need a good regexp package at some point.

Fixes #110.

R=rsc
CC=golang-dev
https://golang.org/cl/152131
2009-11-14 12:23:24 -08:00
Rob Pike
ceb6031ecd delete TODO now that compiler is better at %
adjust an inconsistency in reflect/type.go's package comment

R=rsc
http://go/go-review/1026029
2009-11-08 20:45:39 -08:00
Rob Pike
a82465103f use the new routine regexp.MustCompile to clean up some code that uses global regexps.
R=rsc, gri
CC=go-dev
http://go/go-review/1016025
2009-11-02 11:37:52 -08:00
Russ Cox
219fb02042 fix build after Mercurial move.
various missing or incorrect files.

R=r
CC=go-dev
http://go/go-review/1014004
2009-10-22 10:59:27 -07:00
Russ Cox
11d3805579 clean more
R=r
DELTA=40  (9 added, 3 deleted, 28 changed)
OCL=35277
CL=35305
2009-10-03 10:38:03 -07:00
Rob Pike
f448057b8a Sqrt in assembler is worth 3-4X for nbody
R=rsc
DELTA=10  (10 added, 0 deleted, 0 changed)
OCL=34987
CL=34987
2009-09-24 14:47:34 -07:00
Rob Pike
b9493ded12 updated numbers after more slice inlining
R=rsc
DELTA=57  (57 added, 0 deleted, 0 changed)
OCL=34896
CL=34901
2009-09-22 14:13:40 -07:00
Russ Cox
20011bc878 unused imports
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Russ Cox
ae54cf73ca last round: non-package code
R=r
DELTA=127  (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650
2009-09-15 12:42:24 -07:00
Russ Cox
28eba4877b fix "declared and not used" errors in non-test code.
R=r
DELTA=112  (6 added, 57 deleted, 49 changed)
OCL=34610
CL=34610
2009-09-14 17:20:29 -07:00
Rob Pike
7f0dd8b1b7 new benchmark results.
main changes:
	gccgo is much slower on  binary-tree and fannkuch
	6g seems to struggle with alignment of loops in nbody (dignosis uncertain)
	6g is a little faster at regexps and concurrency

R=rsc
DELTA=93  (93 added, 0 deleted, 0 changed)
OCL=34320
CL=34322
2009-09-03 11:41:01 -07:00
Russ Cox
4b409289f6 remove Line in bufio.ReadLine(Bytes|Slice|String)
also drop bool arg from ReadString

R=r
DELTA=45  (13 added, 1 deleted, 31 changed)
OCL=33923
CL=33960
2009-08-27 11:20:15 -07:00
Robert Griesemer
0dbd8971a2 - use in-place bignum operations where available
- runs approx. 30% faster

R=r
DELTA=24  (10 added, 2 deleted, 12 changed)
OCL=32984
CL=33005
2009-08-10 17:44:46 -07:00
Rob Pike
ea8197cb45 new timing data after compiler updates (fp regs, integer div and mod)
R=rsc
DELTA=90  (90 added, 0 deleted, 0 changed)
OCL=32993
CL=33001
2009-08-10 17:04:59 -07:00
David Symonds
b65a5225f6 Partially fix build: don't assume . is in PATH.
APPROVED=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=32948
CL=32948
2009-08-09 19:18:40 -07:00
Rob Pike
266a2c47e0 run benchmarks in a relatively fast test mode, as part of run.bash/all.bash
R=rsc
DELTA=293  (224 added, 0 deleted, 69 changed)
OCL=32917
CL=32944
2009-08-09 14:31:05 -07:00
Rob Pike
c12ccabb9c chameneos
R=rsc
DELTA=514  (513 added, 0 deleted, 1 changed)
OCL=32898
CL=32910
2009-08-07 15:28:46 -07:00
Russ Cox
0ab8dbef76 annotations
TBR=r
OCL=32896
CL=32896
2009-08-07 14:18:30 -07:00
Rob Pike
5005fb46a2 simplify threadring slightly; slight speed improvement
R=rsc
DELTA=7  (3 added, 3 deleted, 1 changed)
OCL=32885
CL=32889
2009-08-07 13:30:20 -07:00
Rob Pike
c30d81bd23 threadring
more interesting than most

R=rsc
DELTA=132  (131 added, 0 deleted, 1 changed)
OCL=32876
CL=32881
2009-08-07 12:53:51 -07:00
Rob Pike
e98dde27ef timing updates after 6g change for efficient division by powers of two
R=rsc
DELTA=25  (23 added, 0 deleted, 2 changed)
OCL=32873
CL=32875
2009-08-07 10:39:45 -07:00
Rob Pike
2f9c48f6d1 timings for pidigits
TBR=rsc
OCL=32857
CL=32857
2009-08-06 18:27:15 -07:00
Robert Griesemer
081bc69cde - initial version of pidigits.go benchmark
- extra bignum.go functionality for pidigits.go
- tuned bignum multiplication

R=r
DELTA=193  (186 added, 0 deleted, 7 changed)
OCL=32852
CL=32856
2009-08-06 18:16:51 -07:00
Rob Pike
7655588438 meteor-contest
R=rsc
DELTA=1276  (1275 added, 0 deleted, 1 changed)
OCL=32851
CL=32854
2009-08-06 18:04:48 -07:00
Rob Pike
c68398617b mandelbrot
R=rsc
DELTA=147  (145 added, 0 deleted, 2 changed)
OCL=32840
CL=32845
2009-08-06 14:21:21 -07:00
Rob Pike
7955490de2 add runtime.GOMAXPROCS, allowing a program to, in effect, set $GOMAXPROCS
R=rsc
DELTA=29  (28 added, 1 deleted, 0 changed)
OCL=32829
CL=32837
2009-08-06 13:07:05 -07:00
Rob Pike
ae3939cb78 k-nucleotide
R=rsc
DELTA=367  (366 added, 0 deleted, 1 changed)
OCL=32832
CL=32836
2009-08-06 13:00:26 -07:00
Rob Pike
158f3f6440 parallel spectral-norm
R=rsc
DELTA=85  (84 added, 1 deleted, 0 changed)
OCL=32810
CL=32810
2009-08-05 18:44:49 -07:00
Rob Pike
8764ebee95 spectral-norm
make regexp-dna use bytes not strings (no significant timing change)

R=rsc
DELTA=149  (138 added, 1 deleted, 10 changed)
OCL=32804
CL=32807
2009-08-05 17:25:38 -07:00
Rob Pike
d9a0bc9b58 regex-dna
R=rsc
DELTA=243  (242 added, 0 deleted, 1 changed)
OCL=32786
CL=32791
2009-08-05 13:03:46 -07:00
Rob Pike
6b7bf38487 fannkuch
R=rsc
DELTA=240  (239 added, 0 deleted, 1 changed)
OCL=32783
CL=32785
2009-08-05 11:33:59 -07:00
Rob Pike
3a23e53387 binary tree
R=rsc
DELTA=324  (323 added, 0 deleted, 1 changed)
OCL=32759
CL=32768
2009-08-04 19:38:08 -07:00
Rob Pike
abaf604648 add info about Sqrt instruction
couple of fixes to timing.sh

R=rsc
DELTA=10  (5 added, 0 deleted, 5 changed)
OCL=32742
CL=32756
2009-08-04 17:31:19 -07:00
Rob Pike
5b1fb14371 nbody benchmark
timing.sh improvements

R=rsc
DELTA=334  (319 added, 0 deleted, 15 changed)
OCL=32734
CL=32736
2009-08-04 14:27:46 -07:00
Rob Pike
0444da91c0 improve myrandom() in fasta.
add script to automate timing

R=rsc
DELTA=78  (68 added, 0 deleted, 10 changed)
OCL=32729
CL=32732
2009-08-04 14:07:17 -07:00
Rob Pike
9ae42ee87f another benchmark: reverse-complement
R=rsc
DELTA=682  (511 added, 171 deleted, 0 changed)
OCL=32725
CL=32727
2009-08-04 13:04:37 -07:00
Rob Pike
417683c3d3 clean up the code a bit
start a log of progress

R=rsc
DELTA=222  (185 added, 17 deleted, 20 changed)
OCL=32701
CL=32718
2009-08-04 10:13:58 -07:00
Rob Pike
9155bb3345 benchmark checkpoint milestone checkin submission
R=rsc
DELTA=311  (311 added, 0 deleted, 0 changed)
OCL=32696
CL=32699
2009-08-03 21:03:58 -07:00