summaryrefslogtreecommitdiff
path: root/tests/compare/md5-v-sha1.php
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 03:47:30 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 03:47:30 +0300
commit059e0d95d0c28bc5060e87e146eaf7411f51bf90 (patch)
tree7c21ac432f16dde2329a0d5954d70711eceb48e6 /tests/compare/md5-v-sha1.php
parent26cd8ee99659ef1926c96a049c93645ffc9b169d (diff)
downloadgyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.gz
gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.bz2
gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.zip
skeleton commit; based on an anom project
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..44b5148
--- /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');
+Benchmark::render_report('code');
+
+echo "test completed!";
+die();
+ \ No newline at end of file