]> Cypherpunks repositories - gostls13.git/commit
runtime: speed up cgo calls
authorAlex Brainman <alex.brainman@gmail.com>
Thu, 18 Aug 2011 16:17:09 +0000 (12:17 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 18 Aug 2011 16:17:09 +0000 (12:17 -0400)
commit72e83483a7d2594c9f5072e420a1c8cb9f88c409
tree6b57f537a899d3762c4eb402530058ceddc5b080
parent4cf630da0feea55844ac26356bcefbd95ceb665b
runtime: speed up cgo calls

Allocate Defer on stack during cgo calls, as suggested
by dvyukov. Also includes some comment corrections.

benchmark                   old,ns/op   new,ns/op
BenchmarkCgoCall                  669         330
(Intel Xeon CPU 1.80GHz * 4, Linux 386)

R=dvyukov, rsc
CC=golang-dev
https://golang.org/cl/4910041
misc/cgo/test/basic.go
misc/cgo/test/cgo_test.go
src/pkg/runtime/386/asm.s
src/pkg/runtime/amd64/asm.s
src/pkg/runtime/cgocall.c
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.h