diff options
author | root <root> | 2008-02-08 13:20:26 +0000 |
---|---|---|
committer | root <root> | 2008-02-08 13:20:26 +0000 |
commit | c135b9963b4e98e71e08a0da1aeba2d2adf5dfda (patch) | |
tree | c495493ba3b105846cf6c724fa497485971cda77 | |
parent | 9fccd9eefe09bd5469679ed9a08175a5cb895b13 (diff) |
*** empty log message ***
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | bench.c | 27 |
2 files changed, 23 insertions, 7 deletions
@@ -1,6 +1,7 @@ 3.1 Fri Nov 30 11:33:04 CET 2007 - IMPORTANT BUGFIX: a too long final literal run would corrupt data - in the encoder. + in the encoder (this was introduced in 3.0 only, earlier versions + are safe). 3.0 Tue Nov 13 22:13:09 CET 2007 - switched to 2-clause bsd with "GPL v2 or any later version" option. @@ -1,6 +1,13 @@ #include <stdio.h> #include <assert.h> #include <string.h> +#include <time.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/ioctl.h> +#include <math.h> +#include <X11/Xlib.h> #include "lzf.h" //#include "fastlz.c" @@ -36,17 +43,25 @@ int main(void) int i, l, j; int min = 1<<30; int lp; + char buf[8192]; + int p[2]; + + pipe (p); FILE *f = fopen ("data", "r"); fread (data, DSIZE, 1, f); fclose (f); - - for (lp = 0; lp < 1000; lp++) { + + for (lp = 0; lp < 100000; lp++) { s=stamp(); - l = lzf_compress (data, DSIZE, data2, DSIZE*2); - //l = fastlz_compress_level (1, data, DSIZE, data2); + + kill (0, 23); +// write (p[1], &p, 1); +// read (p[1], &i, 4); + si[0]=measure(s); - j = lzf_decompress (data2, l, data3, DSIZE*2); + + //j = lzf_decompress (data2, l, data3, DSIZE*2); printf ("\r%10d (%d) ", si[0], l); if (si[0] < min && si[0] > 0) @@ -57,7 +72,7 @@ int main(void) fflush (stdout); - assert (memcmp (data, data3, DSIZE) == 0); + //assert (memcmp (data, data3, DSIZE) == 0); } return 0; } |