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 <iant@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Michael Pratt 2023-05-31 17:12:58 -04:00
parent eee6f2b921
commit 01e703c2f6
1 changed files with 8 additions and 0 deletions

View 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 -->