Russ Cox
a1616d4a32
reflect: shorten value to 3 words
...
scalar is no longer needed, now that
interfaces always hold pointers.
Comparing best of 5 with TurboBoost turned off,
on a 2012 Retina MacBook Pro Core i5.
Still not completely confident in these numbers,
but the gob and template improvements seem real.
benchmark old ns/op new ns/op delta
BenchmarkBinaryTree17 3819892491 3803008185 -0.44%
BenchmarkFannkuch11 3623876405 3611776426 -0.33%
BenchmarkFmtFprintfEmpty 119 118 -0.84%
BenchmarkFmtFprintfString 294 292 -0.68%
BenchmarkFmtFprintfInt 310 304 -1.94%
BenchmarkFmtFprintfIntInt 513 507 -1.17%
BenchmarkFmtFprintfPrefixedInt 427 426 -0.23%
BenchmarkFmtFprintfFloat 562 554 -1.42%
BenchmarkFmtManyArgs 1873 1832 -2.19%
BenchmarkGobDecode 15824504 14746565 -6.81%
BenchmarkGobEncode 14347378 14208743 -0.97%
BenchmarkGzip 537229271 537973492 +0.14%
BenchmarkGunzip 134996775 135406149 +0.30%
BenchmarkHTTPClientServer 119065 116937 -1.79%
BenchmarkJSONEncode 29134359 28928099 -0.71%
BenchmarkJSONDecode 106867289 105770161 -1.03%
BenchmarkMandelbrot200 5798475 5791433 -0.12%
BenchmarkGoParse 5299169 5379201 +1.51%
BenchmarkRegexpMatchEasy0_32 195 195 +0.00%
BenchmarkRegexpMatchEasy0_1K 477 477 +0.00%
BenchmarkRegexpMatchEasy1_32 170 170 +0.00%
BenchmarkRegexpMatchEasy1_1K 1412 1397 -1.06%
BenchmarkRegexpMatchMedium_32 336 337 +0.30%
BenchmarkRegexpMatchMedium_1K 109025 108977 -0.04%
BenchmarkRegexpMatchHard_32 5854 5856 +0.03%
BenchmarkRegexpMatchHard_1K 184914 184748 -0.09%
BenchmarkRevcomp 829233526 836598734 +0.89%
BenchmarkTemplate 142055312 137016166 -3.55%
BenchmarkTimeParse 598 597 -0.17%
BenchmarkTimeFormat 564 568 +0.71%
Fixes #7425 .
LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant, khr
https://golang.org/cl/158890043
2014-10-15 14:24:18 -04:00
Russ Cox
94950afdf8
reflect: add fast path for FieldByIndex with len(index) = 1
...
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/152640043
2014-10-15 13:33:00 -04:00
Russ Cox
62d3202aaa
reflect: fix IsValid vs Kind mismatch after Elem of nil interface
...
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/151960044
2014-10-01 16:51:32 -04:00
Russ Cox
dd8f29e3fe
reflect: adjust Value.String to give correct answer for methods
...
Fixes #7859 .
LGTM=r
R=adonovan, r
CC=golang-codereviews
https://golang.org/cl/136710043
2014-09-18 21:19:18 -04:00
Russ Cox
f0d44dbeaf
runtime: look up arg stackmap for makeFuncStub/methodValueStub during traceback
...
makeFuncStub and methodValueStub are used by reflect as
generic function implementations. Each call might have
different arguments. Extract those arguments from the
closure data instead of assuming it is the same each time.
Because the argument map is now being extracted from the
function itself, we don't need the special cases in reflect.Call
anymore, so delete those.
Fixes an occasional crash seen when stack copying does
not update makeFuncStub's arguments correctly.
Will also help make it safe to require stack maps in the
garbage collector.
Derived from CL 142000044 by khr.
LGTM=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/143890044
2014-09-12 07:29:19 -04:00
Keith Randall
b78d7b75c7
reflect: use runtime's memmove instead of its own
...
They will both need write barriers at some point.
But until then, no reason why we shouldn't share.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/141330043
2014-09-10 12:37:28 -07:00
Russ Cox
c007ce824d
build: move package sources from src/pkg to src
...
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
2014-09-08 00:08:51 -04:00