https://github.com/nu11ptr/cgobench
Simple benchmark of cgo calling overhead
https://github.com/nu11ptr/cgobench
Last synced: 5 months ago
JSON representation
Simple benchmark of cgo calling overhead
- Host: GitHub
- URL: https://github.com/nu11ptr/cgobench
- Owner: nu11ptr
- License: apache-2.0
- Created: 2017-11-27T13:24:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T15:02:01.000Z (over 8 years ago)
- Last Synced: 2024-06-20T05:08:33.542Z (about 2 years ago)
- Language: Go
- Size: 6.84 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cgobench
Simple benchmark of cgo calling overhead
Results from my machine:
------------------------
scott@saruman:~/Dropbox/go/src/github.com/nu11ptr/cgobench$ go test -bench=.
goos: linux
goarch: amd64
pkg: github.com/nu11ptr/cgobench
BenchmarkCGo0Args-8 20000000 64.6 ns/op
BenchmarkCGo1IntArg-8 20000000 62.5 ns/op
BenchmarkCGo3PtrArgs-8 20000000 65.3 ns/op
Benchmark0Args-8 2000000000 0.25 ns/op
Benchmark1IntArg-8 2000000000 0.25 ns/op
Benchmark3PtrArgs-8 2000000000 0.25 ns/op
PASS
ok github.com/nu11ptr/cgobench 5.654s