]> Cypherpunks repositories - gostls13.git/commitdiff
math/bits: note that functions here may be compiler intrinsics
authorNick Craig-Wood <nick@craig-wood.com>
Wed, 19 Oct 2022 16:26:33 +0000 (17:26 +0100)
committerKeith Randall <khr@google.com>
Fri, 21 Oct 2022 17:51:06 +0000 (17:51 +0000)
It was noted in the go1.9 release notes that functions in math/bits
may be implemented by compiler intrinsics, but this never made it to
the documentation.

This change adapts the wording of the release notes and puts it in the
documentation for math/bits.

Change-Id: Ibeea88eaf7df10952cbe670885e910ac30b49d55
Reviewed-on: https://go-review.googlesource.com/c/go/+/444035
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/math/bits/bits.go

index 65452feda2ce4601caa75ae5a95fee2af5e2103d..6ca4bfe9a60373cff1a2d2f6b1c86656420c6e06 100644 (file)
@@ -6,6 +6,12 @@
 
 // Package bits implements bit counting and manipulation
 // functions for the predeclared unsigned integer types.
+//
+// Functions in this package may be implemented directly by
+// the compiler, for better performance. For those functions
+// the code in this package will not be used. Which
+// functions are implemented by the compiler depends on the
+// architecture and the Go release.
 package bits
 
 const uintSize = 32 << (^uint(0) >> 63) // 32 or 64