Live data from Hacker News

Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

github.com

41–50 of 51 posts

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#41
post #33

Earlier quoted context omitted.

That is a bit too harsh. Not all applications require those guarantees. It’s fine if you can trust the inputs.

The inputs can never be trusted

If inputs are part of the application bundl3, they can be trusted as much as the code itself.

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#42

It's a somewhat known tradeoff, you can streamline and make the format friendlier to do memcpy which this library targets, the more memcpys you do, the faster it is overall to decode. On highly compressible data lz4, snappy become faster. Snappy on level 2 has faster decompression speed But you have to pay the price that you need a slower encoding, because finding matches, putting restrictions on match lengths, putti…

Is there a way to regain some compression ratio in Snappy if you're okay with slow compression but need fast decompression?

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#44
post #29
post #18

Earlier quoted context omitted.

You probably meant MB/sec not GB.

No? Decompression is rated in GB/s per core now.

Parent fixed the error I pointed out since making my post by dividing by a thousand instead of changing the units so now my comment looks wrong.

It used to say 2800 GB/s which is obviously bonkers.

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#45
post #4

Nice results, I will keep a watch on this! Would be interesting to see benchmarks vs Oodle compression, I think the most similar one is Selkie?

Yes, the most similar one is indeed Selkie.

misa77 and oodle are both supported in turbobench (see: https://github.com/powturbo/turbobench), so it's easy to compare them.

Results on the silesia corpus on the same Intel setup described in the README, using turbobench:

  codec       decode      ratio    encode
  misa77 -0   5309 MB/s   42.64%   58.2 MB/s
  misa77 -1   4332 MB/s   39.65%   54.5 MB/s
  selkie -1   3095 MB/s   43.48%   197 MB/s
  selkie -2   3013 MB/s   41.80%   163 MB/s
  selkie -3   3081 MB/s   39.58%   95.8 MB/s
  selkie -4   3498 MB/s   36.95%   43.3 MB/s
  selkie -5   2607 MB/s   33.58%   2.97 MB/s
  lz4         2530 MB/s   47.60%   373 MB/s
Note: selkie -4 corresponds to the "Normal" level here.

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#46

cool, now do zstd!

Zstd already follows the pareto line very closely and also decompresses pretty fast. In case you're looking for a memory-safe version in Rust that avoids the FFI penalty in hot loops, optimized to hell and back, this here is the new kid on the block: https://github.com/paddor/zrip

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#47
post #4

Nice results, I will keep a watch on this! Would be interesting to see benchmarks vs Oodle compression, I think the most similar one is Selkie?

Yes, the most similar one is indeed Selkie. misa77 and oodle are both supported in turbobench (see: https://github.com/powturbo/turbobench ), so it's easy to compare them. Results on the silesia corpus on the same Intel setup described in the README, using turbobench: codec decode ratio encode misa77 -0 5309 MB/s 42.64% 58.2 MB/s misa77 -1 4332 MB/s 39.65% 54.5 MB/s selkie -1 3095 MB/s 43.48% 197 MB/s selkie -2 3013…

Any chance you can throw lzop into that table just as a reference point?

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#48

Earlier quoted context omitted.

Yes, the most similar one is indeed Selkie. misa77 and oodle are both supported in turbobench (see: https://github.com/powturbo/turbobench ), so it's easy to compare them. Results on the silesia corpus on the same Intel setup described in the README, using turbobench: codec decode ratio encode misa77 -0 5309 MB/s 42.64% 58.2 MB/s misa77 -1 4332 MB/s 39.65% 54.5 MB/s selkie -1 3095 MB/s 43.48% 197 MB/s selkie -2 3013…

Any chance you can throw lzop into that table just as a reference point?

Added memcpy in here too, same setup as before:

  codec       decode        ratio     encode
  misa77 -0   5302 MB/s     42.64%    58.7 MB/s
  selkie -3   3078 MB/s     39.58%    97.0 MB/s
  lzo1x -1    421 MB/s      47.48%    314 MB/s
  memcpy      12135 MB/s    100.00%   11952 MB/s

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#49
post #44
post #29

Earlier quoted context omitted.

No? Decompression is rated in GB/s per core now.

Parent fixed the error I pointed out since making my post by dividing by a thousand instead of changing the units so now my comment looks wrong. It used to say 2800 GB/s which is obviously bonkers.

Yes, it was a typo. Thank you!

Re: Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

#50

Almost double the decompression speed, *and* a higher compression ratio than LZ4? That's very promising. I don't see much in your README that talks about how a developer would integrate misa into their code. I might suggest some basic code samples to help a developer integrate misa decode into their project. Congrats, looks like a cool project.

Paying a huge price during compression. I think the compression speed is yet to be vastly improved, for example there are no arch-specific implementations, like they did with decompression.
Post reply on HN