good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit c97fb09c authored by Anmol Sethi's avatar Anmol Sethi
Browse files

mask_asm: Disable for now until v1.9.0

See #326
parent 0edbb280
Branches
Tags
No related merge requests found
...@@ -16,8 +16,6 @@ import ( ...@@ -16,8 +16,6 @@ import (
// to be in little endian. // to be in little endian.
// //
// See https://github.com/golang/go/issues/31586 // See https://github.com/golang/go/issues/31586
//
//lint:ignore U1000 mask.go
func maskGo(b []byte, key uint32) uint32 { func maskGo(b []byte, key uint32) uint32 {
if len(b) >= 8 { if len(b) >= 8 {
key64 := uint64(key)<<32 | uint64(key) key64 := uint64(key)<<32 | uint64(key)
......
...@@ -3,10 +3,14 @@ ...@@ -3,10 +3,14 @@
package websocket package websocket
func mask(b []byte, key uint32) uint32 { func mask(b []byte, key uint32) uint32 {
// TODO: Will enable in v1.9.0.
return maskGo(b, key)
/*
if len(b) > 0 { if len(b) > 0 {
return maskAsm(&b[0], len(b), key) return maskAsm(&b[0], len(b), key)
} }
return key return key
*/
} }
// @nhooyr: I am not confident that the amd64 or the arm64 implementations of this // @nhooyr: I am not confident that the amd64 or the arm64 implementations of this
...@@ -18,4 +22,5 @@ func mask(b []byte, key uint32) uint32 { ...@@ -18,4 +22,5 @@ func mask(b []byte, key uint32) uint32 {
// See https://github.com/nhooyr/websocket/pull/326#issuecomment-1771138049 // See https://github.com/nhooyr/websocket/pull/326#issuecomment-1771138049
// //
//go:noescape //go:noescape
//lint:ignore U1000 disabled till v1.9.0
func maskAsm(b *byte, len int, key uint32) uint32 func maskAsm(b *byte, len int, key uint32) uint32
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment