]> Cypherpunks repositories - gostls13.git/commit
cmd/6g: inline copies of up to 4 words in length.
authorKeith Randall <khr@golang.org>
Mon, 30 Dec 2013 20:14:27 +0000 (12:14 -0800)
committerKeith Randall <khr@golang.org>
Mon, 30 Dec 2013 20:14:27 +0000 (12:14 -0800)
commit0ea20bc981b2135cd67e7ff4ec71c05214bccc52
tree8af7cb1412a7b2dce6a620b40259156425a47a61
parent1cc2ff8fc7b3729116f43bf68f9456b8f2d0efa9
cmd/6g: inline copies of up to 4 words in length.

This change fixes a serious performance regression
with reflect.Value growing to 4 words instead of 3.
The json benchmark was ~50% slower, with this change
it is ~5% slower (and the binary is 0.5% larger).

Longer term, we probably need to rethink our copy
generation.  Using REP is really expensive time-wise.
But inlining the copy grows the binary.

R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/44990043
src/cmd/6g/cgen.c