@@ -0,0 +1,673 @@
+#!/usr/bin/env python%0A%22%22%22Simple benchmark of python vs c scrypt%22%22%22%0A%0Aimport time%0A%0Afrom pylibscrypt import scrypt%0Afrom pypyscrypt_inline import scrypt as pyscrypt%0A%0A# Benchmark time in seconds %0Atmin = 5%0ANmax = 20%0A%0At2 = time.time()%0Afor i in xrange(1, Nmax+1):%0A    pyscrypt(b'password', b'NaCl', N=2**i)%0A    if time.time() - t2 %3E tmin:%0A        Nmax = i%0A        break%0At2 = time.time() - t2%0Aprint('Using N = 2,4,..., 2**%25d' %25 Nmax)%0Aprint('Python scrypt took %25.2fs' %25 t2)%0A%0At1 = time.time()%0Afor i in xrange(1, Nmax+1):%0A    scrypt(b'password', b'NaCl', N=2**i)%0At1 = time.time() - t1%0Aprint('C scrypt took      %25.2fs' %25 t1)%0A%0Aprint('Python scrypt took %25.2f times as long' %25 (t2 / t1))%0A%0A

Add benchmark program