diff options
author | Russ Cox <rsc@golang.org> | 2009-09-15 12:42:24 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-09-15 12:42:24 -0700 |
commit | 7f51e880cd29a4c63860dad59cc60916119cc2df (patch) | |
tree | 8e115ff2eb9c4f2040c2c1b69dc50de1d874981d /test/bench | |
parent | c6fac6bdd2b1fd69442a455fb47d09022241dd69 (diff) | |
download | go-7f51e880cd29a4c63860dad59cc60916119cc2df.tar.gz |
last round: non-package code
R=r
DELTA=127 (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650
Diffstat (limited to 'test/bench')
-rw-r--r-- | test/bench/chameneosredux.go | 2 | ||||
-rw-r--r-- | test/bench/regex-dna.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/bench/chameneosredux.go b/test/bench/chameneosredux.go index a8cd85454..e89e69b7d 100644 --- a/test/bench/chameneosredux.go +++ b/test/bench/chameneosredux.go @@ -175,7 +175,7 @@ func play(ref *Referee, color []Color) { fmt.Printf("\n"); <-ref.done; total := 0; - for i, c := range cham { + for _, c := range cham { total += c.count; fmt.Printf("%d %s\n", c.count, say(c.same)); } diff --git a/test/bench/regex-dna.go b/test/bench/regex-dna.go index 637cb1454..f42efc6d4 100644 --- a/test/bench/regex-dna.go +++ b/test/bench/regex-dna.go @@ -106,10 +106,10 @@ func main() { // Delete the comment lines and newlines bytes = compile("(>[^\n]+)?\n").ReplaceAll(bytes, []byte{}); clen := len(bytes); - for i, s := range variants { + for _, s := range variants { fmt.Printf("%s %d\n", s, countMatches(s, bytes)); } - for i, sub := range substs { + for _, sub := range substs { bytes = compile(sub.pat).ReplaceAll(bytes, strings.Bytes(sub.repl)); } fmt.Printf("\n%d\n%d\n%d\n", ilen, clen, len(bytes)); |