Browse Source

+ benchmark to test md5 improvement by internal rol

git-svn-id: trunk@11471 -
florian 17 years ago
parent
commit
076df335e8
2 changed files with 27 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 26 0
      tests/bench/bmd5.pp

+ 1 - 0
.gitattributes

@@ -6168,6 +6168,7 @@ tests/bench/bansi1.pp -text
 tests/bench/bansi1mt.pp svneol=native#text/plain
 tests/bench/blists1.inc svneol=native#text/plain
 tests/bench/blists1.pp svneol=native#text/plain
+tests/bench/bmd5.pp svneol=native#text/plain
 tests/bench/dmisc.pas svneol=native#text/plain
 tests/bench/drystone.pas svneol=native#text/plain
 tests/bench/pi.c -text

+ 26 - 0
tests/bench/bmd5.pp

@@ -0,0 +1,26 @@
+{$mode objfpc}
+uses
+  stopuhr,md5;
+
+
+const
+  Strings: array[1..7] of string = (
+    '',
+    'a',
+    'abc',
+    'message digest',
+    'abcdefghijklmnopqrstuvwxyz',
+    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
+    '12345678901234567890123456789012345678901234567890123456789012345678901234567890'
+    );
+
+var
+  i,j : integer;
+  s : string;
+begin
+  start;
+  for i:=1 to 500000 do
+    for j:=low(Strings) to high(Strings) do
+      MDString(Strings[j],MD_VERSION_5);
+  stop;
+end.