Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 03 Feb 2012 09:11:47 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: build experiment

On 02/03/2012 07:01 AM, Solar Designer wrote:
> On Thu, Feb 02, 2012 at 10:05:19AM +0100, magnum wrote:
>> Why is it that if I compile everything in one line, like this...
> ...
>> ...it works just fine but I get really poor figures for intrinsics
>> md4/md5/sha1,

>> This is less than half normal speed (formats that do not use
>> sse-intrinsics.c performs normally). Btw the binary is 911K instead of
>> 1.2M for linux-x86-64.
> 
> I don't readily know the answer - I'd need to do the same thing and look
> at the binary.  Please let us know if you figure this out.

Some more clues. Only MD4 and MD5 are slowed down to less than half, not
SHA1 - it's got normal speed.

I added -g and run it under callgrind. 86% is spent in SSEmd5body()
compared to 73% for a normal build, confirming this function got
relatively slower. Apart from that, everything looks normal. Since this
relative slow-down is still present when ran under callgrind (which
normally is 50x slower), this rules out cache issues and the likes, I
suppose.

I tried the exact same compile but replaced sse-intrinsics.c with
sse-intrinsics-64.S and that version is as fast as a normal build.

This is the exact commands I used:

rm *.o
ln -fs x86-64.h arch.h
make fmt_registers.h
make fmt_externs.h
gcc -o ../run/john -g -Wall -O2 -fomit-frame-pointer -DHAVE_CRYPT
x86-64.S base64.c batch.c bench.c BF_std.c c3_fmt.c charset.c common.c
compiler.c config.c cracker.c crc32.c DES_bs_b.c DES_bs.c DES_std.c
dummy.c dynamic_parser.c dynamic_preloads.c dynamic_utils.c external.c
formats.c getopt.c gladman_hmac.c gladman_pwd2key.c hmacmd5.c idle.c
inc.c john.c list.c loader.c logger.c math.c md4.c md5.c md5_eq.c
md5_go.c MD5_std.c memory.c misc.c mkv.c mkvlib.c options.c params.c
path.c pdf2john.c pdfcrack.c pdfcrack_common.c pdfcrack_md5.c
pdfcrack_rc4.c pdfparser.c rar2john.c rc4.c recovery.c rpp.c rules.c
signals.c single.c sse-intrinsics.c ssh2john.c status.c timer.c tty.c
unafs.c undrop.c unicode.c unique.c unshadow.c wordlist.c zip2john.c
*_plug.c AFS_fmt.c BF_fmt.c BSDI_fmt.c DES_fmt.c dragonfly3_fmt.c
dragonfly4_fmt.c dynamic_fmt.c hmacSHA224_fmt.c hmacSHA256_fmt.c
hmacSHA384_fmt.c hmacSHA512_fmt.c hmailserver_fmt.c LM_fmt.c MD5_fmt.c
pdf_fmt.c rar_fmt.c rawSHA224_fmt.c rawSHA256_fmt.c rawSHA384_fmt.c
rawSHA512_fmt.c sha-crypt_256_fmt.c sha-crypt_512_fmt.c SKEY_fmt.c
ssh_fmt.c SybaseASE_fmt.c trip_fmt.c XSHA512_fmt.c zip_fmt.c -lcrypto
-lssl -lm -lz -lcrypt


I also tried using icc instead but for some reason it errors out. I will
look more into that.


magnum

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.