Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ebaf8724b6617169ff87cf3031d613e4@smtp.hushmail.com>
Date: Mon, 15 Apr 2013 03:56:22 +0200
From: magnum <john.magnum@...hmail.com>
To: "john-dev@...ts.openwall.com" <john-dev@...ts.openwall.com>
Subject: AVX on OSX

Finally I managed to build on OSX with -march=native, enabling AVX and stuff (until now you could only get SSE2).

The problem is two-fold. First you need to get a real, recent gcc. This is easy, for example you can get one from Homebrew or Macports. Second, you need an 'as' that is capable of AVX and stuff. This is harder but today I found an ingenious script[1] that make 'as' a wrapper to clang's assembler, which do understand the new instructions (even the native clang does).

The script is included in the commit. To use it, you need to copy it (osx_as_wrapper.sh in the src directory) to /usr/local/bin/as or to some other directory (but the file MUST be named 'as') and ensure this directory is first in your $PATH. And before you ask: No, this can't be done with $(AS) in Makefile no matter how you put it.


Benchmarks with macosx-x86-64 (gcc 4.8.0, core i7 @2.3 GHz):

Benchmarking: Traditional DES [128/128 BS SSE2-16]... DONE
Many salts:	4630K c/s real, 4676K c/s virtual
Only one salt:	4497K c/s real, 4497K c/s virtual

Benchmarking: LM DES [128/128 BS SSE2-16]... DONE
Raw:	63135K c/s real, 63135K c/s virtual

Benchmarking: NT MD4 [128/128 SSE2 intrinsics 12x]... DONE
Raw:	39088K c/s real, 39088K c/s virtual

Benchmarking: Raw MD5 [128/128 SSE2 intrinsics 12x]... DONE
Raw:	30810K c/s real, 30810K c/s virtual

Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 SSE2 intrinsics 4x]... DONE
Raw:	19955K c/s real, 19955K c/s virtual

Benchmarking: Raw SHA-256 [128/128 SSE2 instrinsics 4x]... DONE
Raw:	6745K c/s real, 6745K c/s virtual

Benchmarking: Raw SHA-512 [128/128 SSE2 intrinsics 2x]... DONE
Raw:	2919K c/s real, 2919K c/s virtual


Benchmarks with the new macosx-x86-64-native:

Benchmarking: Traditional DES [128/128 BS AVX-16]... DONE
Many salts:	4937K c/s real, 4937K c/s virtual
Only one salt:	4789K c/s real, 4789K c/s virtual

Benchmarking: LM DES [128/128 BS AVX-16]... DONE
Raw:	65024K c/s real, 65024K c/s virtual

Benchmarking: NT MD4 [128/128 AVX intrinsics 12x]... DONE
Raw:	44387K c/s real, 44387K c/s virtual

Benchmarking: Raw MD5 [128/128 AVX intrinsics 12x]... DONE
Raw:	34403K c/s real, 34403K c/s virtual

Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 AVX intrinsics 4x]... DONE
Raw:	23775K c/s real, 23775K c/s virtual

Benchmarking: Raw SHA-256 [128/128 SSE4.1 instrinsics 4x]... DONE
Raw:	8611K c/s real, 8611K c/s virtual

Benchmarking: Raw SHA-512 [128/128 SSSE3 intrinsics 2x]... DONE
Raw:	3245K c/s real, 3245K c/s virtual


magnum

[1] http://mac-os-forge.2317878.n4.nabble.com/gcc-as-AVX-binutils-and-MacOS-X-10-7-td144472.html


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.