Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Optimize masking with math/bits#171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nhooyr merged 4 commits intomasterfromfast-xor
Nov 7, 2019
Merged

Optimize masking with math/bits#171

nhooyr merged 4 commits intomasterfromfast-xor
Nov 7, 2019

Conversation

nhooyr
Copy link
Contributor

@nhooyrnhooyr commentedNov 6, 2019
edited
Loading

Seegolang/go#31586 (comment)

Thanks@renthraysk

benchmark                      old MB/s     new MB/s     speedup BenchmarkXOR/2/fast-8          470.88       492.61       1.05x BenchmarkXOR/3/fast-8          602.24       719.25       1.19x BenchmarkXOR/4/fast-8          718.82       1186.64      1.65x BenchmarkXOR/8/fast-8          1027.60      1718.71      1.67x BenchmarkXOR/16/fast-8         1413.31      3430.46      2.43x BenchmarkXOR/32/fast-8         2701.81      5585.42      2.07x BenchmarkXOR/128/fast-8        7757.97      13432.37     1.73x BenchmarkXOR/512/fast-8        15155.03     18797.79     1.24x BenchmarkXOR/4096/fast-8       20689.95     20334.61     0.98x BenchmarkXOR/16384/fast-8      21687.87     21613.94     1.00x

Now its faster than basic XOR at every byte size greater than 2 on little
endian amd64 machines.

And faster at every level than gobwas/ws and gorilla/websocket.

amirhossein-shakeri reacted with hooray emojiandersfylling reacted with heart emoji
Seegolang/go#31586 (comment)Thanks@renthrayskbenchmark                      old MB/s     new MB/s     speedupBenchmarkXOR/2/fast-8          470.88       492.61       1.05xBenchmarkXOR/3/fast-8          602.24       719.25       1.19xBenchmarkXOR/4/fast-8          718.82       1186.64      1.65xBenchmarkXOR/8/fast-8          1027.60      1718.71      1.67xBenchmarkXOR/16/fast-8         1413.31      3430.46      2.43xBenchmarkXOR/32/fast-8         2701.81      5585.42      2.07xBenchmarkXOR/128/fast-8        7757.97      13432.37     1.73xBenchmarkXOR/512/fast-8        15155.03     18797.79     1.24xBenchmarkXOR/4096/fast-8       20689.95     20334.61     0.98xBenchmarkXOR/16384/fast-8      21687.87     21613.94     1.00xNow its faster than basic XOR at every byte size greater than 2 onlittle endian amd64 machines.
@nhooyr
Copy link
ContributorAuthor

nhooyr commentedNov 7, 2019
edited
Loading

More optimization is possible, seegolang/go#31586 (comment)

amirhossein-shakeri reacted with eyes emoji

Thanks again to@renthrayskThis provides another significant speedup.benchmark                        old MB/s     new MB/s     speedupBenchmark_mask/2/fast-8          405.48       513.25       1.27xBenchmark_mask/3/fast-8          518.93       661.92       1.28xBenchmark_mask/4/fast-8          1207.10      1252.39      1.04xBenchmark_mask/8/fast-8          1708.82      1655.63      0.97xBenchmark_mask/16/fast-8         3418.58      3051.25      0.89xBenchmark_mask/32/fast-8         5789.43      5813.31      1.00xBenchmark_mask/128/fast-8        12819.53     14804.50     1.15xBenchmark_mask/512/fast-8        18247.06     21659.50     1.19xBenchmark_mask/4096/fast-8       19802.31     23885.68     1.21xBenchmark_mask/16384/fast-8      20896.97     25081.11     1.20x
@github-actions
Copy link

Coverage Status

Coverage decreased (-0.2%) to 92.308% when pulling15d0a18 on fast-xor into0fc34f9 on master.

@nhooyrnhooyr merged commitc781bdf intomasterNov 7, 2019
@nhooyrnhooyr deleted the fast-xor branchNovember 7, 2019 02:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@nhooyr

[8]ページ先頭

©2009-2025 Movatter.jp