Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(22)

Issue 6549055: code review 6549055: crypto/aes: speed up using AES-NI on amd64 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by minux1
Modified:
11 years, 6 months ago
Reviewers:
CC:
golang-dev, bradfitz, dfc, rsc
Visibility:
Public.

Description

crypto/aes: speed up using AES-NI on amd64 This CL requires CL 5970055. benchmark old ns/op new ns/op delta BenchmarkEncrypt 161 23 -85.71% BenchmarkDecrypt 158 24 -84.24% BenchmarkExpand 526 62 -88.21% benchmark old MB/s new MB/s speedup BenchmarkEncrypt 99.32 696.19 7.01x BenchmarkDecrypt 100.93 641.56 6.36x

Patch Set 1 #

Patch Set 2 : diff -r 29cff1e8de4e https://code.google.com/p/go #

Patch Set 3 : diff -r 29cff1e8de4e https://code.google.com/p/go #

Patch Set 4 : diff -r 29cff1e8de4e https://code.google.com/p/go #

Patch Set 5 : diff -r 29cff1e8de4e https://code.google.com/p/go #

Patch Set 6 : diff -r 29cff1e8de4e https://code.google.com/p/go #

Patch Set 7 : diff -r 7c53f5b1e1bf https://code.google.com/p/go #

Patch Set 8 : diff -r 7c53f5b1e1bf https://code.google.com/p/go #

Total comments: 1

Patch Set 9 : diff -r 99bb8c9e067d https://code.google.com/p/go #

Patch Set 10 : diff -r c9b56bb76d08 https://code.google.com/p/go/ #

Patch Set 11 : diff -r c2719ae32b09 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+365 lines, -6 lines) Patch
M src/pkg/crypto/aes/aes_test.go View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
A src/pkg/crypto/aes/asm_amd64.s View 1 2 3 4 5 6 7 8 9 1 chunk +287 lines, -0 lines 0 comments Download
M src/pkg/crypto/aes/block.go View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/crypto/aes/cipher.go View 1 2 3 4 5 6 1 chunk +6 lines, -2 lines 0 comments Download
A src/pkg/crypto/aes/cipher_asm.go View 1 2 3 4 5 6 7 8 9 1 chunk +46 lines, -0 lines 0 comments Download
A src/pkg/crypto/aes/cipher_generic.go View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 10
minux1
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 6 months ago (2012-09-23 19:26:55 UTC) #1
minux1
BenchmarkExpand is wrong, fixed in Patch Set 6. New result: benchmark old ns/op new ns/op ...
11 years, 6 months ago (2012-09-23 19:29:44 UTC) #2
bradfitz
Underscore func names look kinda weird in Go code. On Sep 23, 2012 12:26 PM, ...
11 years, 6 months ago (2012-09-23 19:31:45 UTC) #3
minux1
I didn't optimize for 386, so just FYI, the 386 result is: BenchmarkEncrypt 2000000 905 ...
11 years, 6 months ago (2012-09-23 19:34:32 UTC) #4
minux1
On 2012/09/23 19:31:45, bradfitz wrote: > Underscore func names look kinda weird in Go code. ...
11 years, 6 months ago (2012-09-23 19:35:58 UTC) #5
dfc
On 2012/09/23 19:35:58, minux wrote: > On 2012/09/23 19:31:45, bradfitz wrote: > > Underscore func ...
11 years, 6 months ago (2012-09-23 21:52:27 UTC) #6
rsc
Or use a Go suffix, as in sqrtGo.
11 years, 6 months ago (2012-09-23 22:11:40 UTC) #7
minux1
PTAL. In aes_test.go, we can only test Go version of expandKey, because AES-NI uses native ...
11 years, 6 months ago (2012-09-24 08:12:17 UTC) #8
rsc
LGTM Putting 'Fast' in a function name never ends well. http://codereview.appspot.com/6549055/diff/12008/src/pkg/crypto/aes/cipher_fast.go File src/pkg/crypto/aes/cipher_fast.go (right): http://codereview.appspot.com/6549055/diff/12008/src/pkg/crypto/aes/cipher_fast.go#newcode10 ...
11 years, 6 months ago (2012-09-24 16:41:54 UTC) #9
minux1
11 years, 6 months ago (2012-09-26 17:54:30 UTC) #10
*** Submitted as http://code.google.com/p/go/source/detail?r=57503accfdc7 ***

crypto/aes: speed up using AES-NI on amd64

This CL requires CL 5970055.

benchmark           old ns/op    new ns/op    delta
BenchmarkEncrypt          161           23  -85.71%
BenchmarkDecrypt          158           24  -84.24%
BenchmarkExpand           526           62  -88.21%

benchmark            old MB/s     new MB/s  speedup
BenchmarkEncrypt        99.32       696.19    7.01x
BenchmarkDecrypt       100.93       641.56    6.36x

R=golang-dev, bradfitz, dave, rsc
CC=golang-dev
http://codereview.appspot.com/6549055
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b