]> Cypherpunks repositories - gostls13.git/commit
crypto/rc4: add simple amd64 asm implementation.
authorAdam Langley <agl@golang.org>
Wed, 30 Jan 2013 16:01:19 +0000 (11:01 -0500)
committerAdam Langley <agl@golang.org>
Wed, 30 Jan 2013 16:01:19 +0000 (11:01 -0500)
commit475d86b6d98a9d7c30d3933d3097727dddb94320
tree2bb634b70c2141a1ab6eec44e9ee5a12e4e4a561
parentee908748265debed97592f63a40f41a17e9c9d2a
crypto/rc4: add simple amd64 asm implementation.

(Although it's still half the speed of OpenSSL.)

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128         1409          398  -71.75%
BenchmarkRC4_1K         10920         2898  -73.46%
BenchmarkRC4_8K        131323        23083  -82.42%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128        90.83       321.43    3.54x
BenchmarkRC4_1K         93.77       353.28    3.77x
BenchmarkRC4_8K         61.65       350.73    5.69x

R=rsc, remyoudompheng
CC=golang-dev, jgrahamc
https://golang.org/cl/7234055
src/pkg/crypto/rc4/rc4.go
src/pkg/crypto/rc4/rc4_amd64.s [new file with mode: 0644]
src/pkg/crypto/rc4/rc4_asm.go [new file with mode: 0644]
src/pkg/crypto/rc4/rc4_ref.go [new file with mode: 0644]
src/pkg/crypto/rc4/rc4_test.go