]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go1.21: mention improvement to C-to-Go calls
authorMichael Pratt <mpratt@google.com>
Wed, 31 May 2023 21:12:58 +0000 (17:12 -0400)
committerMichael Pratt <mpratt@google.com>
Wed, 31 May 2023 21:27:40 +0000 (21:27 +0000)
For #51676.
For #58645.

Change-Id: I9045051b5a25c6dfc833eef13e6c105a0d8ae763
Reviewed-on: https://go-review.googlesource.com/c/go/+/499716
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

doc/go1.21.html

index aa6fce6d3660f5e87a507d7da0df80e57e170f8b..3f7a73947f8f40f9ceafb8c2e6358cb6c3f24b4e 100644 (file)
@@ -202,6 +202,14 @@ Do not send CLs removing the interior tags from such phrases.
   increasing <code>GOGC</code> and/or <code>GOMEMLIMIT</code> slightly.
 </p>
 
+<p><!-- https://go.dev/issue/51676 -->
+  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.
+</p>
+
 <h2 id="compiler">Compiler</h2>
 
 <!-- CL 490819 -->