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

Issue 6849097: code review 6849097: time: add Now()/UnixNano() malloc tests (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by dfc
Modified:
11 years, 4 months ago
Reviewers:
CC:
bradfitz, minux1, golang-dev
Visibility:
Public.

Description

time: add Now()/UnixNano() malloc tests The fix for issue 4403 may include more calls to time.Now().UnixNano(). I was concerned that if this function allocated it would cause additional garbage on the heap. It turns out that it doesn't, which is a nice surprise. Also add benchmark for Now().UnixNano()

Patch Set 1 #

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

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

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

Total comments: 2

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -1 line) Patch
M src/pkg/time/time_test.go View 1 2 3 4 2 chunks +40 lines, -1 line 0 comments Download

Messages

Total messages: 7
dfc
Hello bradfitz@golang.org, minux.ma@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 4 months ago (2012-11-24 05:30:24 UTC) #1
bradfitz
LGTM On Fri, Nov 23, 2012 at 9:30 PM, <dave@cheney.net> wrote: > Reviewers: bradfitz, minux, ...
11 years, 4 months ago (2012-11-24 05:34:08 UTC) #2
dfc
PTAL. I removed some junk that leaked in from a previous change.
11 years, 4 months ago (2012-11-24 05:35:05 UTC) #3
bradfitz
LGTM On Fri, Nov 23, 2012 at 9:35 PM, <dave@cheney.net> wrote: > PTAL. I removed ...
11 years, 4 months ago (2012-11-24 05:37:33 UTC) #4
minux1
tested on windows/386. FYI: time.Now() will allocate only when stack split occurs. https://codereview.appspot.com/6849097/diff/9001/src/pkg/time/time_test.go File src/pkg/time/time_test.go ...
11 years, 4 months ago (2012-11-24 08:15:37 UTC) #5
dfc
Thank you for your comments. I'll submit this when we have a few more builders ...
11 years, 4 months ago (2012-11-24 08:18:44 UTC) #6
dfc
11 years, 4 months ago (2012-11-25 00:29:15 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=50a6b483af08 ***

time: add Now()/UnixNano() malloc tests

The fix for issue 4403 may include more calls to time.Now().UnixNano(). I was
concerned that if this function allocated it would cause additional garbage on
the heap. It turns out that it doesn't, which is a nice surprise.

Also add benchmark for Now().UnixNano()

R=bradfitz, minux.ma
CC=golang-dev
http://codereview.appspot.com/6849097
Sign in to reply to this message.

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