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

Issue 9648043: code review 9648043: container/alloc: add Cache component (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 12 months ago by dvyukov
Modified:
10 years, 2 months ago
Reviewers:
dave, dsymonds, rsc, r, golang-dev, bradfitz
Visibility:
Public.

Description

container/alloc: add Cache component A Cache caches interchangeable objects, two methods -- Put and Take. Intended for optimization of memory allocation. The final implementation is intended to use runtime support to implement per-GOMAXPROC caching. This implementation simply defines the interface and adds tests. See the issue for context. Update issue 4720.

Patch Set 1 #

Patch Set 2 : diff -r e66374feac5c https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r e66374feac5c https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 4

Patch Set 4 : diff -r ca0067091b83 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 2

Patch Set 5 : diff -r bb012ad2fa67 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 9

Patch Set 6 : diff -r bc2993c5834f https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 7 : diff -r bc2993c5834f https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -0 lines) Patch
A src/pkg/container/alloc/cache.go View 1 2 3 4 5 1 chunk +61 lines, -0 lines 0 comments Download
A src/pkg/container/alloc/cache_test.go View 1 2 3 1 chunk +136 lines, -0 lines 0 comments Download

Messages

Total messages: 17
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 12 months ago (2013-05-22 14:17:36 UTC) #1
bradfitz
https://codereview.appspot.com/9648043/diff/5001/src/pkg/container/alloc/cache.go File src/pkg/container/alloc/cache.go (right): https://codereview.appspot.com/9648043/diff/5001/src/pkg/container/alloc/cache.go#newcode20 src/pkg/container/alloc/cache.go:20: func (c *Cache) Put(v interface{}) { I'd still like ...
10 years, 12 months ago (2013-05-22 16:14:45 UTC) #2
dvyukov
On 2013/05/22 16:14:45, bradfitz wrote: > https://codereview.appspot.com/9648043/diff/5001/src/pkg/container/alloc/cache.go > File src/pkg/container/alloc/cache.go (right): > > https://codereview.appspot.com/9648043/diff/5001/src/pkg/container/alloc/cache.go#newcode20 > ...
10 years, 12 months ago (2013-05-22 16:30:50 UTC) #3
bradfitz
I don't know where this is going. Here's what I want: * composable pieces, if ...
10 years, 12 months ago (2013-05-22 19:08:21 UTC) #4
dvyukov
On 2013/05/22 19:08:21, bradfitz wrote: > I don't know where this is going. > > ...
10 years, 12 months ago (2013-05-22 19:42:51 UTC) #5
bradfitz
https://codereview.appspot.com/9648043/diff/9001/src/pkg/container/alloc/cache.go File src/pkg/container/alloc/cache.go (right): https://codereview.appspot.com/9648043/diff/9001/src/pkg/container/alloc/cache.go#newcode16 src/pkg/container/alloc/cache.go:16: // If not nil, used to create new resources. ...
10 years, 12 months ago (2013-05-22 20:12:00 UTC) #6
dvyukov
On 2013/05/22 20:12:00, bradfitz wrote: > https://codereview.appspot.com/9648043/diff/9001/src/pkg/container/alloc/cache.go > File src/pkg/container/alloc/cache.go (right): > > https://codereview.appspot.com/9648043/diff/9001/src/pkg/container/alloc/cache.go#newcode16 > ...
10 years, 12 months ago (2013-05-23 07:31:59 UTC) #7
dave_cheney.net
Dmitry, thank you for working on this. Without trying to pour cold water on your ...
10 years, 12 months ago (2013-05-23 07:38:14 UTC) #8
bradfitz
Huh? What do you propose as an alternative? Go doesn't have generics. On Thu, May ...
10 years, 12 months ago (2013-05-23 07:42:09 UTC) #9
dave_cheney.net
Yes, I am proposing not doing anything. I know this is not a popular or ...
10 years, 12 months ago (2013-05-23 07:45:30 UTC) #10
dvyukov
It's always possible to wrap it in a particular case, if it's a problem: type ...
10 years, 12 months ago (2013-05-23 07:47:20 UTC) #11
dsymonds
On Thu, May 23, 2013 at 5:38 PM, <dave@cheney.net> wrote: > I know that with ...
10 years, 12 months ago (2013-05-23 08:38:25 UTC) #12
dvyukov
Brad, ping.
10 years, 11 months ago (2013-06-03 09:19:54 UTC) #13
r
just comments on the documentation i am still undecided about the package itself. https://codereview.appspot.com/9648043/diff/16001/src/pkg/container/alloc/cache.go File ...
10 years, 11 months ago (2013-06-03 12:31:59 UTC) #14
bradfitz
I don't care to review this more until everybody's in agreement with some plan. I ...
10 years, 11 months ago (2013-06-03 14:04:28 UTC) #15
dvyukov
https://codereview.appspot.com/9648043/diff/16001/src/pkg/container/alloc/cache.go File src/pkg/container/alloc/cache.go (right): https://codereview.appspot.com/9648043/diff/16001/src/pkg/container/alloc/cache.go#newcode12 src/pkg/container/alloc/cache.go:12: // A Cache caches interchangeable objects. On 2013/06/03 12:31:59, ...
10 years, 11 months ago (2013-06-03 14:32:18 UTC) #16
rsc
10 years, 5 months ago (2013-12-18 20:12:16 UTC) #17
R=close

sync.Pool replaces this.
Sign in to reply to this message.

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