From: Michael Pratt
Date: Wed, 31 May 2023 21:12:58 +0000 (-0400)
Subject: doc/go1.21: mention improvement to C-to-Go calls
X-Git-Tag: go1.21rc1~153
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=01e703c2f6bcdc02d95e37b8f6bf21ff2c91196d;p=gostls13.git
doc/go1.21: mention improvement to C-to-Go calls
For #51676.
For #58645.
Change-Id: I9045051b5a25c6dfc833eef13e6c105a0d8ae763
Reviewed-on: https://go-review.googlesource.com/c/go/+/499716
Reviewed-by: Ian Lance Taylor
Run-TryBot: Michael Pratt
TryBot-Result: Gopher Robot
---
diff --git a/doc/go1.21.html b/doc/go1.21.html
index aa6fce6d36..3f7a73947f 100644
--- a/doc/go1.21.html
+++ b/doc/go1.21.html
@@ -202,6 +202,14 @@ Do not send CLs removing the interior tags from such phrases.
increasing GOGC
and/or GOMEMLIMIT
slightly.
+
+ Calls from C to Go on threads created in C require some setup to prepare for
+ Go execution. On Unix platforms, this setup is now preserved across multiple
+ calls from the same thread. This significantly reduces the overhead of
+ subsequent C to Go calls from ~1-3 microseconds per call to ~100-200
+ nanoseconds per call.
+
+
Compiler