]> Cypherpunks repositories - gostls13.git/commit
gc: elide call to runtime.closure for function literals called in-place.
authorLuuk van Dijk <lvd@golang.org>
Tue, 31 May 2011 18:52:21 +0000 (20:52 +0200)
committerLuuk van Dijk <lvd@golang.org>
Tue, 31 May 2011 18:52:21 +0000 (20:52 +0200)
commit9b82408f6df2dde74828f9c945112ef554f67397
tree94bb6b5e1852b640ffb2fd894c973afb733a39a3
parent6216307e25d00bfd5ca18b8dacbb6ac85f2b9d6a
gc: elide call to runtime.closure for function literals called in-place.

before:
runtime_test.BenchmarkCallClosure        5000000               499 ns/op
runtime_test.BenchmarkCallClosure1       5000000               681 ns/op

after:
runtime_test.BenchmarkCallClosure       500000000                5 ns/op
runtime_test.BenchmarkCallClosure1       10000000              160 ns/op

R=rsc
CC=golang-dev
https://golang.org/cl/4515167
src/cmd/gc/closure.c
src/cmd/gc/go.h
src/cmd/gc/walk.c
src/pkg/runtime/closure_test.go [new file with mode: 0644]