All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] do not unroll big stuff in twofish key setup if OPTIMIZE_FOR_SIZE
Date: Wed, 24 Oct 2007 18:44:54 +0100	[thread overview]
Message-ID: <200710241844.54215.vda.linux@googlemail.com> (raw)
In-Reply-To: <20071023060748.GA27501@gondor.apana.org.au>

On Tuesday 23 October 2007 07:07, Herbert Xu wrote:
> On Sun, Oct 21, 2007 at 08:16:25PM +0100, Denys Vlasenko wrote:
> > Hello Herbert,
> > 
> > Currently twofish cipher key setup code
> > has unrolled loops - approximately 70-100
> > instructions are repeated 40 times.
> > 
> > As a result, twofish module is the biggest module
> > in crypto/*.
> > 
> > Attached patch conditionalize this unrolling on
> > CONFIG_CC_OPTIMIZE_FOR_SIZE. Presumably, people which
> > want to use -Os will also prefer to not have these loops
> > unrolled:
> 
> Thanks for the patch Denys.
> 
> Have you looked at the performance figures on x86 for the two
> variants? If the difference is small we could just get rid of
> the unrolled version altogether.

7% slower key setup (see patch - there is a comment about it).
--
vda

  reply	other threads:[~2007-10-24 17:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-21 19:16 [PATCH] do not unroll big stuff in twofish key setup if OPTIMIZE_FOR_SIZE Denys Vlasenko
2007-10-23  6:07 ` Herbert Xu
2007-10-24 17:44   ` Denys Vlasenko [this message]
2007-10-25  1:08     ` Herbert Xu
2007-10-25 18:33       ` Denys Vlasenko
2007-10-26  8:24         ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200710241844.54215.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.