Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto/md5: improve performance of md5 block function on ppc64le #15385

Closed
laboger opened this issue Apr 20, 2016 · 2 comments
Closed

crypto/md5: improve performance of md5 block function on ppc64le #15385

laboger opened this issue Apr 20, 2016 · 2 comments

Comments

@laboger
Copy link
Contributor

laboger commented Apr 20, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version devel +3e9264c Tue Apr 19 09:21:57 2016 +0000 linux/ppc64le
  2. What operating system and processor architecture are you using (go env)?
    ./go env
    GOARCH="ppc64le"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="ppc64le"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH=""
    GORACE=""
    GOROOT="/home/boger/golang/md5/go"
    GOTOOLDIR="/home/boger/golang/md5/go/pkg/tool/linux_ppc64le"
    CC="gcc"
    GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build014718722=/tmp/go-build -gno-record-gcc-switches"
    CXX="g++"
    CGO_ENABLED="1"
  3. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.
    No error, just improving the performance of the md5 block function when used on ppc64le.
  4. What did you expect to see?
    Better performance.
  5. What did you see instead?
    Performance with opportunities for improvement.

I have a change to improve the performance of the crypto/md5 block function when built and run on ppc64le. This change provides an improvement of 3-4.76X when using golang with the enhanced implementation of this function.

This is only being done for ppc64le and not ppc64 because:

  1. The implementation for big endian uses byte reverse indexed instructions which are not correctly supported by the plan9 assembler for ppc64.
  2. Performance on ppc64 is not as important as for ppc64le, especially since ppc64 still does not support external linking and therefore can't be used to build production applications.
@laboger
Copy link
Contributor Author

laboger commented Apr 20, 2016

@gopherbot
Copy link

CL https://golang.org/cl/22294 mentions this issue.

ceseo pushed a commit to powertechpreview/go that referenced this issue May 3, 2016
This change improves the performance of the block
function used within crypto/md5 on ppc64le.  The following
improvement was seen:

BenchmarkHash8Bytes              8.39         26.04        3.10x
BenchmarkHash1K                  99.41        407.84       4.10x
BenchmarkHash8K                  108.87       460.00       4.23x
BenchmarkHash8BytesUnaligned     8.39         25.80        3.08x
BenchmarkHash1KUnaligned         89.94        407.81       4.53x
BenchmarkHash8KUnaligned         96.57        459.22       4.76x

Fixes golang#15385

Change-Id: I8af5af089cc3e3740c33c662003d104de5fe1d1b
Reviewed-on: https://go-review.googlesource.com/22294
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Apr 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants