Skip to content

Commit 01e703c

Browse files
committed
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>
1 parent eee6f2b commit 01e703c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/go1.21.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,14 @@ <h2 id="runtime-changes">Runtime</h2>
202202
increasing <code>GOGC</code> and/or <code>GOMEMLIMIT</code> slightly.
203203
</p>
204204

205+
<p><!-- https://go.dev/issue/51676 -->
206+
Calls from C to Go on threads created in C require some setup to prepare for
207+
Go execution. On Unix platforms, this setup is now preserved across multiple
208+
calls from the same thread. This significantly reduces the overhead of
209+
subsequent C to Go calls from ~1-3 microseconds per call to ~100-200
210+
nanoseconds per call.
211+
</p>
212+
205213
<h2 id="compiler">Compiler</h2>
206214

207215
<!-- CL 490819 -->

0 commit comments

Comments
 (0)