summaryrefslogtreecommitdiff
path: root/tests/compare/md5-v-sha1.php
diff options
context:
space:
mode:
authorGeo Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2026-07-12 15:51:52 +0300
committerGeo Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2026-07-12 15:51:52 +0300
commit02608271bb2a9f3a65ed536984d306ee14b48e34 (patch)
tree3f23ec48a694ec014e845c4f70d9b5f1c065403c /tests/compare/md5-v-sha1.php
downloadkalassa-master.tar.gz
kalassa-master.tar.bz2
kalassa-master.zip
initialize repository; add docker config; migrate configuration to new specsHEADmaster
Diffstat (limited to 'tests/compare/md5-v-sha1.php')
-rwxr-xr-xtests/compare/md5-v-sha1.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/compare/md5-v-sha1.php b/tests/compare/md5-v-sha1.php
new file mode 100755
index 0000000..74d0371
--- /dev/null
+++ b/tests/compare/md5-v-sha1.php
@@ -0,0 +1,18 @@
+<?php
+
+echo "test started... ";
+ob_flush();
+
+Benchmark::add_spot('100.000 x md5');
+for($i = 0 ; $i<100000 ; $i++) $x = md5($i);
+
+
+Benchmark::add_spot('100.000 x sha');
+for($i = 0 ; $i<100000 ; $i++) $x = sha1($i);
+
+Benchmark::add_spot('end');
+echo(Benchmark::report(BENCH_REPORT_COMMENT));
+echo "test completed!";
+
+die();
+ \ No newline at end of file