vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

run.sh (747B)


      1 #!/bin/sh
      2 # Simple script to run benchmarks on all the hash functions
      3 # and append the results to a file called results.txt
      4 
      5 echo >>results.txt
      6 echo "Test on "`uname -psr`" at "`date` >>results.txt
      7 for hash in md5 sha1 sha2 ripemd whirlpool; do
      8 	echo "$hash"
      9 	echo "$hash" >results.txt.tmp
     10 
     11 	# Native execution timings
     12 	echo "native	" >>results.txt.tmp
     13 	(dd if=/dev/zero bs=32768 count=16384 2>/dev/null | \
     14 			time -p ./h$hash >/dev/null) \
     15 		2>>results.txt.tmp
     16 
     17 	# VX32 execution timings
     18 	echo "vx32	" >>results.txt.tmp
     19 	(dd if=/dev/zero bs=32768 count=16384 2>/dev/null | \
     20 			time -p ../vxrun/vxrun ./v$hash >/dev/null) \
     21 		2>>results.txt.tmp
     22 
     23 	tr -s " \n" "\t\t" <results.txt.tmp >>results.txt
     24 	echo >>results.txt
     25 done
     26 rm -f results.txt.tmp
     27