good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
websocket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
github
nhooyr
websocket
Commits
c97fb09c
Unverified
Commit
c97fb09c
authored
Apr 6, 2024
by
Anmol Sethi
Browse files
Options
Downloads
Patches
Plain Diff
mask_asm: Disable for now until v1.9.0
See #326
parent
0edbb280
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mask.go
+0
-2
0 additions, 2 deletions
mask.go
mask_asm.go
+9
-4
9 additions, 4 deletions
mask_asm.go
with
9 additions
and
6 deletions
mask.go
+
0
−
2
View file @
c97fb09c
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
mask_asm.go
+
9
−
4
View file @
c97fb09c
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment