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
I didn't optimize for 386, so just FYI, the 386 result is:
BenchmarkEncrypt 2000000 905 ns/op 17.67 MB/s
BenchmarkDecrypt 2000000 890 ns/op 17.97 MB/s
BenchmarkExpand 1000000 2050 ns/op
~5.6 times slower than amd64 version.
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
On 2012/09/23 19:31:45, bradfitz wrote:
> Underscore func names look kinda weird in Go code.
Yeah, i agree. Do you have any suggestions?
I just can't come up with better alternatives (it's 3:35 am now)
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
On 2012/09/23 19:35:58, minux wrote:
> On 2012/09/23 19:31:45, bradfitz wrote:
> > Underscore func names look kinda weird in Go code.
> Yeah, i agree. Do you have any suggestions?
> I just can't come up with better alternatives (it's 3:35 am now)
In bytes and math, generic functions start with g, leaving the original name
available for the assembly versions.
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
PTAL.
In aes_test.go, we can only test Go version of expandKey,
because AES-NI uses native endian for expanded keys, and
it's different from that of examples in FIPS 197.
As we don't expose expanded keys to the outside, i think
this is ok. And I really think if the AES-NI version get
the expanded keys wrong, it won't ever pass the other tests.
However, if you insist, i can add a traslateExpandKeys()
routine for that test.
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
Issue 6549055: code review 6549055: crypto/aes: speed up using AES-NI on amd64
(Closed)
Created 11 years, 6 months ago by minux1
Modified 11 years, 6 months ago
Reviewers:
Base URL:
Comments: 1