Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions benchmark_output.log
Original file line number Diff line number Diff line change
@@ -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)...
2 changes: 1 addition & 1 deletion c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 0 additions & 37 deletions results/benchmark_results.csv
Original file line number Diff line number Diff line change
@@ -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,"