Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(62)

Issue 5451116: code review 5451116: bytes: faster Count, Index, Equal (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 5 months ago by rsc
Modified:
13 years, 5 months ago
Reviewers:
CC:
golang-dev, r, iant
Visibility:
Public.

Description

bytes: faster Count, Index, Equal Benchmarks are from GOARCH=amd64 on a MacPro5,1. benchmark old MB/s new MB/s speedup bytes_test.BenchmarkEqual32 452.89 891.07 1.97x bytes_test.BenchmarkEqual4K 852.71 1700.44 1.99x bytes_test.BenchmarkEqual4M 841.53 1587.93 1.89x bytes_test.BenchmarkEqual64M 838.22 1578.14 1.88x bytes_test.BenchmarkIndex32 58.02 48.99 0.84x bytes_test.BenchmarkIndex4K 48.26 41.32 0.86x bytes_test.BenchmarkIndex4M 48.20 41.24 0.86x bytes_test.BenchmarkIndex64M 48.08 41.21 0.86x bytes_test.BenchmarkIndexEasy32 410.04 546.82 1.33x bytes_test.BenchmarkIndexEasy4K 849.26 14257.37 16.79x bytes_test.BenchmarkIndexEasy4M 854.54 17222.15 20.15x bytes_test.BenchmarkIndexEasy64M 843.57 11060.40 13.11x bytes_test.BenchmarkCount32 57.24 50.68 0.89x bytes_test.BenchmarkCount4K 48.19 41.82 0.87x bytes_test.BenchmarkCount4M 48.18 41.74 0.87x bytes_test.BenchmarkCount64M 48.17 41.71 0.87x bytes_test.BenchmarkCountEasy32 433.11 547.44 1.26x bytes_test.BenchmarkCountEasy4K 1130.59 14194.06 12.55x bytes_test.BenchmarkCountEasy4M 1131.23 17231.18 15.23x bytes_test.BenchmarkCountEasy64M 1111.40 11068.88 9.96x The non-easy Count/Index benchmarks are a worst case input. regexp.BenchmarkMatchEasy0_32 237.46 221.47 0.93x regexp.BenchmarkMatchEasy0_1K 553.53 1019.72 1.84x regexp.BenchmarkMatchEasy0_32K 693.99 1672.06 2.41x regexp.BenchmarkMatchEasy0_1M 688.72 1611.68 2.34x regexp.BenchmarkMatchEasy0_32M 680.70 1565.05 2.30x regexp.BenchmarkMatchEasy1_32 165.56 243.08 1.47x regexp.BenchmarkMatchEasy1_1K 336.45 496.32 1.48x regexp.BenchmarkMatchEasy1_32K 302.80 425.63 1.41x regexp.BenchmarkMatchEasy1_1M 300.42 414.20 1.38x regexp.BenchmarkMatchEasy1_32M 299.64 413.47 1.38x

Patch Set 1 #

Patch Set 2 : diff -r 94f169a6eb9a https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 94f169a6eb9a https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 94f169a6eb9a https://go.googlecode.com/hg/ #

Total comments: 7

Patch Set 5 : diff -r 2a3612bd134b https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -31 lines) Patch
M src/pkg/bytes/asm_386.s View 1 1 chunk +16 lines, -0 lines 0 comments Download
M src/pkg/bytes/asm_amd64.s View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
M src/pkg/bytes/asm_arm.s View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/bytes/bytes.go View 1 2 3 chunks +43 lines, -10 lines 0 comments Download
M src/pkg/bytes/bytes_test.go View 1 2 3 3 chunks +136 lines, -21 lines 0 comments Download
M src/pkg/bytes/export_test.go View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 5 months ago (2011-12-07 16:35:23 UTC) #1
r
REP LGTM http://codereview.appspot.com/5451116/diff/1003/src/pkg/bytes/bytes_test.go File src/pkg/bytes/bytes_test.go (right): http://codereview.appspot.com/5451116/diff/1003/src/pkg/bytes/bytes_test.go#newcode411 src/pkg/bytes/bytes_test.go:411: println("bad count", j) this has been bugging ...
13 years, 5 months ago (2011-12-07 17:06:58 UTC) #2
iant
LGTM http://codereview.appspot.com/5451116/diff/1003/src/pkg/bytes/asm_386.s File src/pkg/bytes/asm_386.s (right): http://codereview.appspot.com/5451116/diff/1003/src/pkg/bytes/asm_386.s#newcode27 src/pkg/bytes/asm_386.s:27: CLD You don't really need the CLD here ...
13 years, 5 months ago (2011-12-07 19:14:03 UTC) #3
rsc
On Wed, Dec 7, 2011 at 14:14, <iant@golang.org> wrote: > You don't really need the ...
13 years, 5 months ago (2011-12-07 20:09:40 UTC) #4
rsc
13 years, 5 months ago (2011-12-07 20:09:59 UTC) #5
*** Submitted as http://code.google.com/p/go/source/detail?r=1d502563ac14 ***

bytes: faster Count, Index, Equal

Benchmarks are from GOARCH=amd64 on a MacPro5,1.

benchmark                                    old MB/s     new MB/s  speedup
bytes_test.BenchmarkEqual32                    452.89       891.07    1.97x
bytes_test.BenchmarkEqual4K                    852.71      1700.44    1.99x
bytes_test.BenchmarkEqual4M                    841.53      1587.93    1.89x
bytes_test.BenchmarkEqual64M                   838.22      1578.14    1.88x

bytes_test.BenchmarkIndex32                     58.02        48.99    0.84x
bytes_test.BenchmarkIndex4K                     48.26        41.32    0.86x
bytes_test.BenchmarkIndex4M                     48.20        41.24    0.86x
bytes_test.BenchmarkIndex64M                    48.08        41.21    0.86x
bytes_test.BenchmarkIndexEasy32                410.04       546.82    1.33x
bytes_test.BenchmarkIndexEasy4K                849.26     14257.37   16.79x
bytes_test.BenchmarkIndexEasy4M                854.54     17222.15   20.15x
bytes_test.BenchmarkIndexEasy64M               843.57     11060.40   13.11x

bytes_test.BenchmarkCount32                     57.24        50.68    0.89x
bytes_test.BenchmarkCount4K                     48.19        41.82    0.87x
bytes_test.BenchmarkCount4M                     48.18        41.74    0.87x
bytes_test.BenchmarkCount64M                    48.17        41.71    0.87x
bytes_test.BenchmarkCountEasy32                433.11       547.44    1.26x
bytes_test.BenchmarkCountEasy4K               1130.59     14194.06   12.55x
bytes_test.BenchmarkCountEasy4M               1131.23     17231.18   15.23x
bytes_test.BenchmarkCountEasy64M              1111.40     11068.88    9.96x

The non-easy Count/Index benchmarks are a worst case input.

regexp.BenchmarkMatchEasy0_32                  237.46       221.47    0.93x
regexp.BenchmarkMatchEasy0_1K                  553.53      1019.72    1.84x
regexp.BenchmarkMatchEasy0_32K                 693.99      1672.06    2.41x
regexp.BenchmarkMatchEasy0_1M                  688.72      1611.68    2.34x
regexp.BenchmarkMatchEasy0_32M                 680.70      1565.05    2.30x
regexp.BenchmarkMatchEasy1_32                  165.56       243.08    1.47x
regexp.BenchmarkMatchEasy1_1K                  336.45       496.32    1.48x
regexp.BenchmarkMatchEasy1_32K                 302.80       425.63    1.41x
regexp.BenchmarkMatchEasy1_1M                  300.42       414.20    1.38x
regexp.BenchmarkMatchEasy1_32M                 299.64       413.47    1.38x

R=golang-dev, r, iant
CC=golang-dev
http://codereview.appspot.com/5451116
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b