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

Issue 881050: code review 881050: big: Add Lsh and Value; convert pidigits to use big (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 11 months ago by eds
Modified:
14 years, 11 months ago
Reviewers:
CC:
rsc, gri, golang-dev
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : code review 881050: big: Add Lsh and Value; convert pidigits to use big #

Total comments: 15

Patch Set 3 : code review 881050: big: Add Lsh and Value; convert pidigits to use big #

Patch Set 4 : code review 881050: big: Add Lsh and Value; convert pidigits to use big #

Patch Set 5 : code review 881050: big: Add Lsh and Value; convert pidigits to use big #

Total comments: 14

Patch Set 6 : code review 881050: big: Add Lsh and Value; convert pidigits to use big #

Total comments: 1

Patch Set 7 : code review 881050: big: Add Lsh and Value; convert pidigits to use big #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -77 lines) Patch
M src/pkg/big/int.go View 1 2 3 4 5 6 4 chunks +57 lines, -18 lines 0 comments Download
M src/pkg/big/int_test.go View 1 2 3 4 5 6 6 chunks +138 lines, -25 lines 0 comments Download
M src/pkg/big/nat.go View 1 2 3 4 5 6 3 chunks +15 lines, -12 lines 0 comments Download
M src/pkg/big/nat_test.go View 1 chunk +1 line, -1 line 0 comments Download
M test/bench/pidigits.go View 1 2 3 chunks +27 lines, -21 lines 0 comments Download

Messages

Total messages: 15
eds
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 11 months ago (2010-04-18 23:32:06 UTC) #1
rsc1
+gri This looks pretty good. Thanks for picking up the ball on this. Robert wrote ...
14 years, 11 months ago (2010-04-19 03:04:12 UTC) #2
eds
I'll address most of these, but have comments/questions on a few points. On Sun, Apr ...
14 years, 11 months ago (2010-04-19 05:10:03 UTC) #3
eds
On Mon, Apr 19, 2010 at 12:10 AM, Evan Shaw <chickencha@gmail.com> wrote: >> http://codereview.appspot.com/881050/diff/2001/3001#newcode383 >> ...
14 years, 11 months ago (2010-04-19 12:30:31 UTC) #4
rsc
On Mon, Apr 19, 2010 at 05:30, Evan Shaw <chickencha@gmail.com> wrote: > On Mon, Apr ...
14 years, 11 months ago (2010-04-19 14:24:32 UTC) #5
eds
One more question http://codereview.appspot.com/881050/diff/2001/3002 File src/pkg/big/int_test.go (right): http://codereview.appspot.com/881050/diff/2001/3002#newcode600 src/pkg/big/int_test.go:600: var valueTests = []int64{ On 2010/04/19 ...
14 years, 11 months ago (2010-04-19 17:50:35 UTC) #6
eds
Hello rsc, gri (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 11 months ago (2010-04-20 00:02:51 UTC) #7
rsc
> src/pkg/big/int_test.go:600: var valueTests = []int64{ > On 2010/04/19 03:04:12, rsc1 wrote: >> >> int64 ...
14 years, 11 months ago (2010-04-20 01:44:43 UTC) #8
rsc1
Looks pretty good. I'd like to change the Div, Mod signatures now even if the ...
14 years, 11 months ago (2010-04-21 00:56:16 UTC) #9
eds
The timings are updated, yes. I've got another CL coming after this one that will ...
14 years, 11 months ago (2010-04-21 01:07:00 UTC) #10
eds
Hello rsc, gri (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 11 months ago (2010-04-21 01:08:13 UTC) #11
rsc1
Looks good but please update the signatures. http://codereview.appspot.com/881050/diff/29001/30001 File src/pkg/big/int.go (right): http://codereview.appspot.com/881050/diff/29001/30001#newcode104 src/pkg/big/int.go:104: func (z ...
14 years, 11 months ago (2010-04-21 02:07:37 UTC) #12
eds
Hello rsc, gri (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 11 months ago (2010-04-21 02:17:37 UTC) #13
rsc1
LGTM I think Robert is out for a day or two. I'll submit this so ...
14 years, 11 months ago (2010-04-21 03:18:44 UTC) #14
rsc
14 years, 11 months ago (2010-04-21 03:39:43 UTC) #15
*** Submitted as http://code.google.com/p/go/source/detail?r=d9a26f033c48 ***

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
http://codereview.appspot.com/881050

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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