summaryrefslogtreecommitdiff
path: root/tests/compare/md5-v-sha1.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compare/md5-v-sha1.php')
-rw-r--r--tests/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 100644
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