]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.13: mention faster sync.Mutex/RWMutex/Once
authorCarlo Alberto Ferraris <cafxx@strayorange.com>
Sat, 10 Aug 2019 13:11:26 +0000 (13:11 +0000)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Sat, 10 Aug 2019 20:06:28 +0000 (20:06 +0000)
Mention faster sync.Mutex/RWMutex/Once in the 1.13 release notes.

Change-Id: I29d8a5004a0af42542e8db82a8c9e2e06a15dbb0
GitHub-Last-Rev: 2995401dab563ea5af98c0f5351f51a6116f105e
GitHub-Pull-Request: golang/go#33404
Reviewed-on: https://go-review.googlesource.com/c/go/+/188479
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
doc/go1.13.html

index 3b9da340aa7f5d0edfbdd25b4b1c5ef32003eed4..554557cd7f7164733792f441957f4f4a6de3217e 100644 (file)
@@ -892,6 +892,14 @@ godoc
 
 <dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
   <dd>
+    <p><!-- CL 148958, CL 148959, CL 152697, CL 152698 -->
+      The fast paths of <a href="/pkg/sync/#Mutex.Lock"><code>Mutex.Lock</code></a>, <a href="/pkg/sync/#Mutex.Unlock"><code>Mutex.Unlock</code></a>,
+      <a href="/pkg/sync/#RWMutex.Lock"><code>RWMutex.Lock</code></a>, <a href="/pkg/sync/#Mutex.RUnlock"><code>RWMutex.RUnlock</code></a>, and
+      <a href="/pkg/sync/#Once.Do"><code>Once.Do</code></a> are now inlined in their callers.
+      For the uncontended cases on amd64, these changes make <a href="/pkg/sync/#Once.Do"><code>Once.Do</code></a> twice as fast, and the
+      <a href="/pkg/sync/#Mutex"><code>Mutex</code></a>/<a href="/pkg/sync/#RWMutex"><code>RWMutex</code></a> methods up to 10% faster.
+    </p>
+
     <p><!-- CL 166960 -->
       Large <a href="/pkg/sync/#Pool"><code>Pool</code></a> no longer increase stop-the-world pause times.
     </p>