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

Issue 6500121: code review 6500121: math: Faster Tanh (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by Charlie Dorian
Modified:
13 years, 9 months ago
Reviewers:
CC:
rsc, golang-dev, mtj1, dave_cheney.net, remyoudompheng
Visibility:
Public.

Description

math: Faster Tanh From 159 to 47.6 ns/op; slightly more accurate.

Patch Set 1 #

Patch Set 2 : diff -r 0d32d96b4cc1 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 0d32d96b4cc1 https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 4 : diff -r 600708342ddd https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -13 lines) Patch
M src/pkg/math/tanh.go View 1 2 3 2 chunks +78 lines, -13 lines 0 comments Download

Messages

Total messages: 14
Charlie Dorian
Hello rsc@golang.org, golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 9 months ago (2012-09-14 03:09:31 UTC) #1
rsc
LGTM Let me know about the const - just want to make sure one of ...
13 years, 9 months ago (2012-09-14 03:13:40 UTC) #2
Charlie Dorian
I included the constant MINLOG because it is mentioned in the documentation; it is not ...
13 years, 9 months ago (2012-09-14 03:17:13 UTC) #3
Charlie Dorian
The two comparisons to MAXLOG allowed me to avoid another case and a call to ...
13 years, 9 months ago (2012-09-14 03:19:58 UTC) #4
mtj1
Original looked like this: z = fabs(x); if( z > 0.5 * MAXLOG ) { ...
13 years, 9 months ago (2012-09-14 03:34:40 UTC) #5
dave_cheney.net
http://codereview.appspot.com/6500121/diff/5001/src/pkg/math/tanh.go File src/pkg/math/tanh.go (right): http://codereview.appspot.com/6500121/diff/5001/src/pkg/math/tanh.go#newcode1 src/pkg/math/tanh.go:1: // Copyright 2012 The Go Authors. All rights reserved. ...
13 years, 9 months ago (2012-09-14 06:33:39 UTC) #6
remyoudompheng
http://codereview.appspot.com/6500121/diff/5001/src/pkg/math/tanh.go File src/pkg/math/tanh.go (right): http://codereview.appspot.com/6500121/diff/5001/src/pkg/math/tanh.go#newcode55 src/pkg/math/tanh.go:55: var tanhP = [...]float64{ Is it faster/clearer to have ...
13 years, 9 months ago (2012-09-14 09:04:18 UTC) #7
Charlie Dorian
On 2012/09/14 09:04:18, remyoudompheng wrote: > http://codereview.appspot.com/6500121/diff/5001/src/pkg/math/tanh.go > File src/pkg/math/tanh.go (right): > > http://codereview.appspot.com/6500121/diff/5001/src/pkg/math/tanh.go#newcode55 > ...
13 years, 9 months ago (2012-09-14 14:29:31 UTC) #8
Charlie Dorian
On 2012/09/14 06:33:39, dfc wrote: > http://codereview.appspot.com/6500121/diff/5001/src/pkg/math/tanh.go > File src/pkg/math/tanh.go (right): > > http://codereview.appspot.com/6500121/diff/5001/src/pkg/math/tanh.go#newcode1 > ...
13 years, 9 months ago (2012-09-14 14:31:40 UTC) #9
Charlie Dorian
Hello rsc@golang.org, golang-dev@googlegroups.com, mtj@google.com, dave@cheney.net, remyoudompheng@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2012-09-14 15:15:59 UTC) #10
Charlie Dorian
On 2012/09/14 03:13:40, rsc wrote: > LGTM > > Let me know about the const ...
13 years, 9 months ago (2012-09-14 15:19:10 UTC) #11
Charlie Dorian
I reverted to the original logic sequence -- it was clearer (and faster by 2 ...
13 years, 9 months ago (2012-09-14 15:20:59 UTC) #12
rsc
LGTM
13 years, 9 months ago (2012-09-17 21:15:36 UTC) #13
rsc
13 years, 9 months ago (2012-09-17 21:18:19 UTC) #14
*** Submitted as http://code.google.com/p/go/source/detail?r=595850cc051e ***

math: Faster Tanh

From 159 to 47.6 ns/op; slightly more accurate.

R=rsc, golang-dev, mtj, dave, remyoudompheng
CC=golang-dev
http://codereview.appspot.com/6500121

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