zeroshade commented on code in PR #37785:
URL: https://github.com/apache/arrow/pull/37785#discussion_r1331764852


##########
go/parquet/internal/bmi/bmi_arm64.go:
##########
@@ -14,40 +14,38 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+//go:build !noasm
 // +build !noasm
 
 package bmi
 
 import (
        "os"
        "strings"
-)
-import (
-       "golang.org/x/sys/cpu"
+
+       "github.com/klauspost/cpuid/v2"
 )
 
 func init() {

Review Comment:
   the reason why the code is duplicated is because this runs at image startup 
(via the `init` function) which means if this package isn't imported, then this 
function never runs. The bottom of the function sets the appropriate function 
pointer based on whether or not the processor actually supports things or not, 
and this package is a low level utility that doesn't import anything else so 
there isn't a shared place I could put this initialization between the two 
places.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to