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

Issue 107020044: code review 107020044: database/sql: use slices rather than container/list

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by Hierro
Modified:
9 years, 8 months ago
Reviewers:
ruiu, gobot, dave, bradfitz
CC:
golang-codereviews, ruiu, bradfitz, dave_cheney.net, minux
Visibility:
Public.

Description

database/sql: use slices rather than container/list Significantly reduces the number of allocations, while also simplifying the code and increasing performance by a 1-2%. benchmark old ns/op new ns/op delta BenchmarkConcurrentDBExec 13290567 13026236 -1.99% BenchmarkConcurrentStmtQuery 13249399 13008879 -1.82% BenchmarkConcurrentStmtExec 8806237 8680182 -1.43% BenchmarkConcurrentTxQuery 13628379 12756293 -6.40% BenchmarkConcurrentTxExec 4794800 4722440 -1.51% BenchmarkConcurrentTxStmtQuery 5040804 5200721 +3.17% BenchmarkConcurrentTxStmtExec 1366574 1336626 -2.19% BenchmarkConcurrentRandom 11119120 10926113 -1.74% benchmark old allocs new allocs delta BenchmarkConcurrentDBExec 14191 13684 -3.57% BenchmarkConcurrentStmtQuery 16020 15514 -3.16% BenchmarkConcurrentStmtExec 4179 3672 -12.13% BenchmarkConcurrentTxQuery 16025 15518 -3.16% BenchmarkConcurrentTxExec 12717 12709 -0.06% BenchmarkConcurrentTxStmtQuery 15532 15525 -0.05% BenchmarkConcurrentTxStmtExec 2175 2168 -0.32% BenchmarkConcurrentRandom 12320 11997 -2.62% benchmark old bytes new bytes delta BenchmarkConcurrentDBExec 2164827 2139760 -1.16% BenchmarkConcurrentStmtQuery 2418070 2394030 -0.99% BenchmarkConcurrentStmtExec 1728782 1704371 -1.41% BenchmarkConcurrentTxQuery 2477144 2452620 -0.99% BenchmarkConcurrentTxExec 588920 588343 -0.10% BenchmarkConcurrentTxStmtQuery 790866 796578 +0.72% BenchmarkConcurrentTxStmtExec 98502 98143 -0.36% BenchmarkConcurrentRandom 1725906 1710220 -0.91%

Patch Set 1 #

Patch Set 2 : diff -r 30307cc8bef2 https://code.google.com/p/go #

Patch Set 3 : diff -r a507dd224581 https://code.google.com/p/go #

Total comments: 4

Patch Set 4 : diff -r a507dd224581 https://code.google.com/p/go #

Total comments: 1

Patch Set 5 : diff -r a507dd224581 https://code.google.com/p/go #

Patch Set 6 : diff -r a507dd224581 https://code.google.com/p/go #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -68 lines) Patch
M src/pkg/database/sql/sql.go View 1 2 3 5 11 chunks +46 lines, -53 lines 3 comments Download
M src/pkg/database/sql/sql_test.go View 1 8 chunks +21 lines, -15 lines 0 comments Download

Messages

Total messages: 14
Hierro
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
9 years, 10 months ago (2014-06-12 17:11:26 UTC) #1
ruiu
https://codereview.appspot.com/107020044/diff/40001/src/pkg/database/sql/sql.go File src/pkg/database/sql/sql.go (right): https://codereview.appspot.com/107020044/diff/40001/src/pkg/database/sql/sql.go#newcode201 src/pkg/database/sql/sql.go:201: connRequests []connRequest // of connRequest The types of these ...
9 years, 10 months ago (2014-06-12 19:31:26 UTC) #2
Hierro
On 2014/06/12 19:31:26, ruiu wrote: > https://codereview.appspot.com/107020044/diff/40001/src/pkg/database/sql/sql.go > File src/pkg/database/sql/sql.go (right): > > https://codereview.appspot.com/107020044/diff/40001/src/pkg/database/sql/sql.go#newcode201 > ...
9 years, 10 months ago (2014-06-12 20:17:58 UTC) #3
ruiu
Looks good to me but please wait for other reviewer's LGTM. I'm not very familiar ...
9 years, 10 months ago (2014-06-12 20:53:42 UTC) #4
gobot
R=golang-dev (assigned by r@golang.org)
9 years, 10 months ago (2014-06-13 18:02:39 UTC) #5
gobot
R=bradfitz@golang.org (assigned by r@golang.org)
9 years, 10 months ago (2014-06-13 18:02:47 UTC) #6
Hierro
On 2014/06/13 18:02:47, gobot wrote: > mailto:R=bradfitz@golang.org (assigned by mailto:r@golang.org) ping
9 years, 10 months ago (2014-06-21 09:23:18 UTC) #7
dave_cheney.net
LGTM. Assigning to brad as he sort of owns the db package. https://codereview.appspot.com/107020044/diff/60001/src/pkg/database/sql/sql.go File src/pkg/database/sql/sql.go ...
9 years, 10 months ago (2014-06-23 00:41:26 UTC) #8
Hierro
On 2014/06/23 00:41:26, dfc wrote: > LGTM. Assigning to brad as he sort of owns ...
9 years, 10 months ago (2014-06-26 16:14:04 UTC) #9
Hierro
Could someone with commit access take a lot at this? Thanks! Regards, Alberto
9 years, 9 months ago (2014-07-10 17:41:41 UTC) #10
minux
R=bradfitz
9 years, 9 months ago (2014-07-10 20:56:08 UTC) #11
bradfitz
LGTM I'll make the one little change as I submit, since this has been pending ...
9 years, 8 months ago (2014-08-28 15:48:56 UTC) #12
bradfitz
*** Submitted as https://code.google.com/p/go/source/detail?r=a701ced4b6da *** database/sql: use slices rather than container/list Significantly reduces the number ...
9 years, 8 months ago (2014-08-28 15:49:59 UTC) #13
gobot
9 years, 8 months ago (2014-08-29 11:02:51 UTC) #14
This CL appears to have broken the freebsd-amd64-race builder.
See http://build.golang.org/log/3b0b3ec604aa505b65e3f79dd1e2c1784c9b0ada
Sign in to reply to this message.

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