Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 24 Jun 2013 16:54:45 +0200
From: Katja Malvoni <kmalvoni@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Parallella: bcrypt

Hello,

On Tue, May 28, 2013 at 1:58 AM, Solar Designer <solar@...nwall.com> wrote:

> Katja, Yaniv -
>
> On Sun, May 26, 2013 at 07:37:55PM -0400, Yaniv Sapir wrote:
> > Here's a couple command line options you can try when compiling the code.
> > Please look at the manual for further details.
> >
> > -mfp-mode=int        # this sets the FPU mode to integer. However, please
> > make sure that the generated code does not re-program the CONFIG register
> > before every integer operation
>
> Let's definitely try this.  I was afraid we'd have to resort to assembly
> code to use the FPU in integer mode - it's great news to me that we seem
> not to have to.
>

Unfortunately, this doesn't help a lot... Execution speed with -02 is
45.969000 ms and with -mfp-mode=int is 45.951000 ms. I checked generated
assembly code it seems that CONFIG register isn't re-programmed before
every integer operation.


>
> > -O3
> > -Ofast               # e-gcc supports this level too
>
> We can try these too, but I don't expect much/any advantage over -O2.
>

Actually these two made it even slower,  50.725000 ms with -O3 and
50.688000 ms with -Ofast

>
> -falign-loops=8 and -falign-functions=8 are worth trying.  (The latter
> should only make a measurable difference with the size-optimized
> implementation, where a portion of code has been moved into a separate
> function that is called from several places.)
>
>
These also didn't help - 46.504000 ms with -falign-loops=8 and 46.542000 ms
with -falign-functions=8

I attached output for every used command line option with code sizes.

Katja

[ CONTENT OF TYPE text/html SKIPPED ]

O2
Message from eCore 0x84a ( 1, 2): Result: "$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"#
Execution time - Epiphany: 45.969000 ms
   text	   data	    bss	    dec	    hex	filename
  42710	   2364	     80	  45154	   b062	e_bcrypt.elf
  

O3
Message from eCore 0x84a ( 1, 2): Result: "$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"#
Execution time - Epiphany: 50.725000 ms
   text	   data	    bss	    dec	    hex	filename
  50102	   2364	     80	  52546	   cd42	e_bcrypt.elf


Ofast
Message from eCore 0x84a ( 1, 2): Result: "$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"#
Execution time - Epiphany: 50.688000 ms
   text	   data	    bss	    dec	    hex	filename
  50102	   2364	     80	  52546	   cd42	e_bcrypt.elf


O2 -funroll-loops
Message from eCore 0x84a ( 1, 2): Result: "$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"#
Execution time - Epiphany: 47.223000 ms
   text	   data	    bss	    dec	    hex	filename
  44990	   2364	     80	  47434	   b94a	e_bcrypt.elf


O2 -falign-loops=8
Message from eCore 0x84a ( 1, 2): Result: "$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"#
Execution time - Epiphany: 46.504000 ms
   text	   data	    bss	    dec	    hex	filename
  42742	   2364	     80	  45186	   b082	e_bcrypt.elf


O2 -falign-functions=8
Message from eCore 0x84a ( 1, 2): Result: "$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"#
Execution time - Epiphany: 46.542000 ms
   text	   data	    bss	    dec	    hex	filename
  42718	   2364	     80	  45162	   b06a	e_bcrypt.elf


O2 -ffast-math 
Message from eCore 0x84a ( 1, 2): Result: "$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"#
Execution time - Epiphany: 45.970000 ms
   text	   data	    bss	    dec	    hex	filename
  42710	   2364	     80	  45154	   b062	e_bcrypt.elf


O2 -mfp-mode=int
Message from eCore 0x84a ( 1, 2): Result: "$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"#
Execution time - Epiphany: 45.951000 ms
   text	   data	    bss	    dec	    hex	filename
  42720	   2364	     80	  45164	   b06c	e_bcrypt.elf

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ