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

Issue 12072045: code review 12072045: crypto/des: faster permutation. (Closed)

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

Description

crypto/des: faster permutation. This patch introduces specialized functions for initial and final permutations, and precomputes the output of the third permutation on the S-box elements. benchmark old ns/op new ns/op delta BenchmarkEncrypt 3581 1226 -65.76% BenchmarkDecrypt 3590 1224 -65.91% benchmark old MB/s new MB/s speedup BenchmarkEncrypt 2.23 6.52 2.92x BenchmarkDecrypt 2.23 6.53 2.93x

Patch Set 1 #

Patch Set 2 : diff -r ae81458f37d7 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 7c42cfa28e24 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r cc5858966b08 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+162 lines, -5 lines) Patch
M src/pkg/crypto/des/block.go View 1 2 4 chunks +118 lines, -5 lines 0 comments Download
M src/pkg/crypto/des/const.go View 1 1 chunk +11 lines, -0 lines 0 comments Download
M src/pkg/crypto/des/des_test.go View 1 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 4
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 2 months ago (2013-07-30 06:32:30 UTC) #1
remyoudompheng
It's now 5x faster than before CL 11874043.
11 years, 2 months ago (2013-07-30 06:39:27 UTC) #2
rsc
LGTM
11 years, 2 months ago (2013-07-30 23:11:17 UTC) #3
remyoudompheng
11 years, 2 months ago (2013-07-31 20:07:24 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=38097c493d8a ***

crypto/des: faster permutation.

This patch introduces specialized functions for initial
and final permutations, and precomputes the output of the
third permutation on the S-box elements.

benchmark           old ns/op    new ns/op    delta
BenchmarkEncrypt         3581         1226  -65.76%
BenchmarkDecrypt         3590         1224  -65.91%

benchmark            old MB/s     new MB/s  speedup
BenchmarkEncrypt         2.23         6.52    2.92x
BenchmarkDecrypt         2.23         6.53    2.93x

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/12072045
Sign in to reply to this message.

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