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

Issue 229049: code review 229049: math: faster hypot (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years ago by Charlie Dorian
Modified:
14 years, 12 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

math: faster hypot Use hardware sqrt for faster hypot; preserve software-only hypot as hypotGo (like sqrtGo); enable benchmarking of hypotGo.

Patch Set 1 #

Patch Set 2 : code review 229049: math: faster hypot, cbrt #

Total comments: 3

Patch Set 3 : code review 229049: math: faster hypot, cbrt #

Patch Set 4 : code review 229049: math: faster hypot #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -24 lines) Patch
M src/pkg/math/Makefile View 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/math/all_test.go View 1 chunk +6 lines, -0 lines 0 comments Download
M src/pkg/math/hypot.go View 1 2 3 3 chunks +2 lines, -24 lines 0 comments Download
A src/pkg/math/hypot_port.go View 1 chunk +63 lines, -0 lines 0 comments Download
A src/pkg/math/hypot_test.go View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 15
Charlie Dorian
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
15 years ago (2010-03-04 03:29:34 UTC) #1
rsc
Thanks. You said cbrt is 10% faster. Why? What changes in the generated code? http://codereview.appspot.com/229049/diff/14/17 ...
15 years ago (2010-03-04 17:32:24 UTC) #2
Charlie Dorian
I'll answer your other comments later, but for now, just FYI: math_test.BenchmarkHypot 100000000 16 ns/op ...
15 years ago (2010-03-04 18:10:01 UTC) #3
rsc
On Thu, Mar 4, 2010 at 10:10, Charles Dorian <cldorian@gmail.com> wrote: > I'll answer your ...
15 years ago (2010-03-04 18:12:24 UTC) #4
Charlie Dorian
Yes, HypotGo is faster than Hypot+sqrtGo : math_test.BenchmarkHypot 10000000 282 ns/op math_test.BenchmarkHypotGo 20000000 108 ns/op ...
15 years ago (2010-03-04 23:53:24 UTC) #5
Charlie Dorian
Thanks for the review. On Thu, Mar 4, 2010 at 12:32 PM, <rsc@golang.org> wrote: > ...
15 years ago (2010-03-05 01:03:59 UTC) #6
rsc
Thanks. I'll get rid of the temporaries and the LEAQs.
15 years ago (2010-03-05 04:19:32 UTC) #7
rsc
If you update, you'll find that the compilers generate the same code with and without ...
15 years ago (2010-03-05 23:35:45 UTC) #8
rsc
Re this CL: Please remove cbrt.go. Please fix the copyright year in hypot.go (20010). Otherwise ...
15 years ago (2010-03-05 23:36:55 UTC) #9
Charlie Dorian
Hello rsc (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2010-03-06 00:28:33 UTC) #10
Charlie Dorian
Hello rsc (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2010-03-06 00:33:57 UTC) #11
Charlie Dorian
Thanks. On Fri, Mar 5, 2010 at 6:36 PM, Russ Cox <rsc@golang.org> wrote: > Re ...
15 years ago (2010-03-06 00:35:11 UTC) #12
Charlie Dorian
Biggest change noticed so far was sqrtGo, from 459 to 393 ns On Fri, Mar ...
15 years ago (2010-03-06 00:36:25 UTC) #13
rsc
LGTM
15 years ago (2010-03-06 00:44:56 UTC) #14
rsc
15 years ago (2010-03-06 00:45:47 UTC) #15
*** Submitted as http://code.google.com/p/go/source/detail?r=39a26f693e1c ***

math: faster hypot

Use hardware sqrt for faster hypot; preserve software-only
hypot as hypotGo (like sqrtGo); enable benchmarking of
hypotGo.

R=rsc
CC=golang-dev
http://codereview.appspot.com/229049

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