ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/liblzf/bench.c
(Generate patch)

Comparing liblzf/bench.c (file contents):
Revision 1.9 by root, Thu Dec 18 16:05:14 2008 UTC vs.
Revision 1.10 by root, Fri May 1 00:30:53 2009 UTC

67 67
68 for (lp = 0; lp < 100000; lp++) { 68 for (lp = 0; lp < 100000; lp++) {
69 s=stamp(); 69 s=stamp();
70 70
71 //snprintf (buf, 64, "<1.%llx>", (unsigned long long)0xa234567812ULL); 71 //snprintf (buf, 64, "<1.%llx>", (unsigned long long)0xa234567812ULL);
72 //getpgrp(); 72 getpgrp();
73 //kill (0, SIGURG); 73 //kill (0, SIGURG);
74 //write (evfd, &ctr, 8); 74 //write (evfd, &ctr, 8);
75 //read (evfd, &ctr, 8); 75 //read (evfd, &ctr, 8);
76 //write (p[1], &buf, 1); 76 //write (p[1], &buf, 1);
77 //read (p[0], &buf, 4); 77 //read (p[0], &buf, 4);
78 //stat ("/etc/passwd", &sbuf); 78 //stat ("/etc/passwd", &sbuf);
79 free(malloc(8*1024*1024)); 79 //struct timeval tv;
80 //gettimeofday (&tv, 0);
81
82 l = lzf_compress (data, DSIZE, data2, DSIZE*2);
83 assert(l);
80 84
81 si[0]=measure(s); 85 si[0]=measure(s);
82 86
83 //j = lzf_decompress (data2, l, data3, DSIZE*2); 87 j = lzf_decompress (data2, l, data3, DSIZE*2);
88 assert (j == DSIZE);
84 89
85 printf ("\r%10d (%d) ", si[0], l); 90 printf ("\r%10d (%d) ", si[0], l);
86 if (si[0] < min && si[0] > 0) 91 if (si[0] < min && si[0] > 0)
87 { 92 {
88 printf ("\n"); 93 printf ("\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines