-
Notifications
You must be signed in to change notification settings - Fork 17.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo/internal/test: benchmark for #cgo noescape directive #62297
Conversation
case: passing a single Go string object to C function. result: 87 ns vs 61 ns. BenchmarkCgoCall/string-pointer-escape BenchmarkCgoCall/string-pointer-escape-12 67731663 87.02 ns/op BenchmarkCgoCall/string-pointer-noescape BenchmarkCgoCall/string-pointer-noescape-12 99424776 61.30 ns/op Signed-off-by: doujiang24 <doujiang24@gmail.com>
This PR (HEAD: fc67d5a) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/522939. Important tips:
|
Message from DeJiang Zhu (doujiang): Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/522939. |
Message from Ian Lance Taylor: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/522939. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/522939. |
Message from Gopher Robot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/522939. |
Message from Ian Lance Taylor: Patch Set 1: Auto-Submit+1 Code-Review+2 Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/522939. |
case: passing a single Go string object to C function. result: 87 ns vs 61 ns. BenchmarkCgoCall/string-pointer-escape BenchmarkCgoCall/string-pointer-escape-12 67731663 87.02 ns/op BenchmarkCgoCall/string-pointer-noescape BenchmarkCgoCall/string-pointer-noescape-12 99424776 61.30 ns/op For #56378 Change-Id: Iff5c69d8deedfa248f5d7399e1921a5cb0dc8b16 GitHub-Last-Rev: fc67d5a GitHub-Pull-Request: #62297 Reviewed-on: https://go-review.googlesource.com/c/go/+/522939 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
This PR is being closed because golang.org/cl/522939 has been merged. |
case: passing a single Go string object to C function.
result: 87 ns vs 61 ns.
BenchmarkCgoCall/string-pointer-escape
BenchmarkCgoCall/string-pointer-escape-12 67731663 87.02 ns/op
BenchmarkCgoCall/string-pointer-noescape
BenchmarkCgoCall/string-pointer-noescape-12 99424776 61.30 ns/op
For #56378