From 01e703c2f6bcdc02d95e37b8f6bf21ff2c91196d Mon Sep 17 00:00:00 2001
From: Michael Pratt
Date: Wed, 31 May 2023 17:12:58 -0400
Subject: [PATCH] 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
---
doc/go1.21.html | 8 ++++++++
1 file changed, 8 insertions(+)
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
--
2.44.0