diff --git a/benchmark_output.log b/benchmark_output.log new file mode 100644 index 0000000..9b1a879 --- /dev/null +++ b/benchmark_output.log @@ -0,0 +1,5 @@ +Running benchmarks... +Crypto Iterations: 5000 +Fast Func Iterations: 10000 +Results will be saved to results/benchmark_results.csv +Benchmarking password_hash (CPU vs. GPU)... \ No newline at end of file diff --git a/c/Makefile b/c/Makefile index 102390a..818c9c4 100644 --- a/c/Makefile +++ b/c/Makefile @@ -4,7 +4,7 @@ CFLAGS=-O3 -march=native -flto -Wall # --- CUDA Configuration --- # Check if nvcc is available NVCC := $(shell command -v nvcc 2> /dev/null) -NVCCFLAGS=-O3 -gencode arch=compute_75,code=sm_75 --std=c++11 +NVCCFLAGS=-O3 --std=c++11 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 # --- argon2-gpu Library --- ARGON2_GPU_DIR=../argon2-gpu diff --git a/results/benchmark_results.csv b/results/benchmark_results.csv index 242817a..5d2eb60 100644 --- a/results/benchmark_results.csv +++ b/results/benchmark_results.csv @@ -1,38 +1 @@ function,iterations,c_time,php_time,c_vs_php_%,c_gpu_time,c_gpu_vs_c_cpu_% -password_hash,5000,176.252689000000,180.276350975037,2.00,N/A (No GPU),N/A -sha256,10000,0.004734000000,0.008186101913,42.00,N/A,N/A -substr,10000,0.000000000000,0.002360105515,100.00,N/A,N/A -gmp_init,10000,0.000789000000,0.003194093704,75.00,N/A,N/A -gmp_mul,10000,0.000152000000,0.003101825714,95.00,N/A,N/A -gmp_add,10000,0.000074000000,0.003020048141,97.00,N/A,N/A -gmp_div,10000,0.000204000000,0.003501892090,94.00,N/A,N/A -hexdec,10000,0.000361000000,0.002308130264,84.00,N/A,N/A -get_time,10000,0.000030000000,0.001369953156,97.00,N/A,N/A -date_math_add,10000,0.000031000000,0.001681804657,98.00,N/A,N/A -date_math_subtract,10000,0.000031000000,0.001677036285,98.00,N/A,N/A -microtime,10000,0.000268000000,0.002048015594,86.00,N/A,N/A -,,,,,, -,,,,,# Test Parameters, -,,,,,parameter,value -,,,,,iterations_crypto,5000 -,,,,,iterations_fast,10000 -,,,,,password,correcthorsebatterystaple -,,,,,short_string,hello world -,,,,,long_string,Lorem ipsum dolor si... -,,,,,substr_start,0 -,,,,,substr_length,8 -,,,,,gmp_a,1234567890123456789012345678901234567890 -,,,,,gmp_b,9876543210987654321098765432109876543210 -,,,,,hex_string,a1b2c3d4e5f6a1b2c3d4e5f6 -,,,,,seconds_to_add,100000 -,,,,,seconds_to_subtract,100000 -,,,,,, -,,,,,# System Specifications, -,,,,,spec,value -,,,,,os,"Linux runnervmg1sw1 6.11.0-1018-azure #18~24.04.1-Ubuntu SMP Sat Jun 28 04:46:03 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux" -,,,,,cpu,"AMD EPYC 7763 64-Core Processor" -,,,,,memory,15Gi -,,,,,c_compiler,"gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0" -,,,,,glibc,"glibc 2.39" -,,,,,php_version,"PHP 8.3.6 (cli) (built: Jul 14 2025 18:30:55) (NTS)" -,,,,,php_modules,"[PHP Modules],amqp,apcu,bcmath,bz2,calendar,Core,ctype,curl,date,dba,dom,enchant,exif,FFI,fileinfo,filter,ftp,gd,gettext,gmp,hash,iconv,igbinary,imagick,imap,intl,json,ldap,libxml,mbstring,memcache,memcached,mongodb,msgpack,mysqli,mysqlnd,odbc,openssl,pcntl,pcre,PDO,pdo_dblib,PDO_Firebird,pdo_mysql,PDO_ODBC,pdo_pgsql,pdo_sqlite,pgsql,Phar,posix,pspell,random,readline,redis,Reflection,session,shmop,SimpleXML,snmp,soap,sockets,sodium,SPL,sqlite3,standard,sysvmsg,sysvsem,sysvshm,tidy,tokenizer,xdebug,xml,xmlreader,xmlwriter,xsl,yaml,Zend OPcache,zip,zlib,zmq,,[Zend Modules],Xdebug,Zend OPcache,"