#1 Re: mORMot 1 » google snappy compression » 2013-04-19 15:42:23

ab wrote:

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.

#2 Re: Low level and performance » SynLZ vs QuickLZ » 2012-01-24 10:25:21

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.

#3 Re: Low level and performance » SynLZ vs QuickLZ » 2012-01-23 19:01:24

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.

#4 Re: Low level and performance » SynLZ vs QuickLZ » 2012-01-23 16:41:00

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

#5 Re: Low level and performance » SynLZ vs QuickLZ » 2012-01-20 13:14:34

What about LZ4 ?

http://code.google.com/p/lz4/

It says that's even faster than QuickLZ...

Board footer

Powered by FluxBB