On Saturday, August 27, 2016 at 9:43:23 AM UTC-7, mura wrote:
>
> We have some legacy systems which use 3DES cryptos extensively and we are 
> attempting to re-write some parts of it in Go recently.
> As an initial experiment, we found that the system overall is about 2x~3x 
> slower than the original C version.
> Although the culprit can not be completely singled out yet, the Go pprof 
> tool has shown that about half of the execution time is spent on the DES 
> operation (and the feistel function, specifically).
>

It's likely that you were previously using OpenSSL's DES code if it was 
written in C. I don't think that OpenSSL has ARM assembly for DES, but it 
does have a lot of a macro-ridden, hand-unrolled code for implementing DES. 
It's not a different algorithm, but the Go code is written to be concise 
rather than to eek out performance.

I'm sure that the Go code could be made faster (at the cost of code size 
and clarity) but if 3DES is a critical hot spot for you, the quickest 
solution may be to wrap OpenSSL's DES function in cgo.


Cheers

AGL

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to