You are not logged in.
Pages: 1
We already investigated LZ4 and QuickLZ algorithms, but were not worth it - see http://synopse.info/forum/viewtopic.php?id=568
But, was the comparison fair ?
You seemed to have compared file i/o operation with pure in-memory benchmark, providing an obvious advantage to the second one.
From the look of it, you have a pretty precise benchmark code.
This should give you some very good feedback on SynLZ behavior, and properly track improvements to your code.
LZ4 is providing something roughly similar, although slightly less precise, through its internal benchmark function, included into bench.c source file.
It can be used with the "-b" command, such as :
LZ4Demo.exe -b samplefile.ext
I guess it should provide something comparable.
In order to compress the data, you'll have to create hashing and maintain a reference table.
This is common to both SynLZ and LZ4, and I suspect that SynLZ assembler is more efficient than LZ4 C source code.
Yes, right, this is not Pascal vs C, but ASM vs C, and you seem skilled enough to outsmart any compiler out there.
That sounds like a good explanation.
I use binaries to make the comparison.
Mmmh, then maybe I/O could get into the way.
The example I/O routine inside "LZ4demo" (posted at http://code.google.com/p/lz4/) is not really optimized, to say the least.
The penalty will be none, if you call the C from pascal. Both are native code.
Thanks for information. It's a long time since i last programmed using pascal,
i was still under the feeling that mixing both codes is quite troublesome.
Maybe i should have a look into it again,
FreePascal has made some great progresses, and i miss the convenience of Delphi.
Very interesting comparison.
SynLZ compressing better is expected, due to hash table (this gain is btw most sensible for text files).
LZ4 decoding faster is expected, due to the absence of hash table, as you mentioned.
But SynLZ compressing faster than LZ4 is interesting, and in fact not expected.
Is this advantage also applicable to binary files, or specific to text files ?
Another question : What was compared : source codes or binaries ?
If source code : is there a performance penalty in calling C code from Pascal ?
Regards
Pages: 1