<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: nonadhocproblem</title><link>https://news.ycombinator.com/user?id=nonadhocproblem</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 15 Jul 2026 21:43:16 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=nonadhocproblem" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by nonadhocproblem in "Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)"]]></title><description><![CDATA[
<p>I'll be resolving issues 2 and 3 in the next couple of weeks (adding a safe decoder and doing a lot of fuzzing).<p>The format, however, might continue to change for some time because I want to push performance even further.</p>
]]></description><pubDate>Wed, 15 Jul 2026 19:34:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=48925983</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48925983</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48925983</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)"]]></title><description><![CDATA[
<p>Yes, that prevents streaming for now.<p>What is the advantage of this? Out-of-order execution (see my decoder's hot loop: <a href="https://github.com/welcome-to-the-sunny-side/misa77/blob/3a91af162dfc4a45fbd6f811d4004de25be744c3/src/decompress_impl.h#L55" rel="nofollow">https://github.com/welcome-to-the-sunny-side/misa77/blob/3a9...</a>).<p>In particular, on even moderately compressible data most blocks take the following form:<p><pre><code>  - 1 token byte + 2 distance bytes 
  - a somewhat unpredictable number of literal bytes
</code></pre>
If these streams are interleaved, then it's harder for the out-of-order core to process the token bytes of several blocks in advance (as the position of the next token byte depends on the unpredictable number of literal bytes in the current block). However, if you separate them (all token bytes in a prefix, and literal bytes in a suffix), the CPU can speculatively parse token bytes of a lot of blocks in advance (as most of the time, it just has to step forward by three bytes to go to the next block's token byte).</p>
]]></description><pubDate>Wed, 15 Jul 2026 19:29:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=48925898</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48925898</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48925898</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)"]]></title><description><![CDATA[
<p>Thanks for the feedback!<p>I haven't implemented any ARM-specific dispatch yet (there are currently no NEON paths for vector ops either, and we instead trust the compiler to autovectorize), and will do so for upcoming versions.</p>
]]></description><pubDate>Wed, 15 Jul 2026 19:02:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=48925565</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48925565</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48925565</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)"]]></title><description><![CDATA[
<p>Almost none. Once again, simplicity comes to our rescue here. The decompressor is simple and a naive safe version I implemented but haven't merged into main yet (see: <a href="https://encode.su/threads/4514-misa77-ridiculously-fast-decompression-at-good-ratios?p=88395&viewfull=1#post88395" rel="nofollow">https://encode.su/threads/4514-misa77-ridiculously-fast-deco...</a>) is only ~5% slower than the current unsafe version (and can very likely be made faster).</p>
]]></description><pubDate>Wed, 15 Jul 2026 18:58:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=48925519</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48925519</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48925519</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)"]]></title><description><![CDATA[
<p>So it's essentially "LZ4 unshackled". I've made several modifications to the LZ4 format, most of which are in service of eliminating branches/making them more predictable, and making decompression very friendly to out-of-order cores by hiding false data dependencies behind a rarely taken branch (similar to this: <a href="https://news.ycombinator.com/item?id=48889148">https://news.ycombinator.com/item?id=48889148</a>).<p>Some concrete changes in the format are:<p><pre><code>  - match length per block is capped to 32
  - distance to a match must be >= a fixed constant
  - unlike lz4, tokens and literals have separate streams
  - format of the token byte has been changed
</code></pre>
Now, this format allows our decompressor's hot loop to be very simple (in terms of the number of branches it has). This simplicity in turn allows our compressor to create a compressed stream that is friendly to the (small number of) branches in the decompressor.<p>The experimental compression modes (see readme) attempt to exploit this even further (but are even slower at compression). I define a "cost", which is a linear function of the branches induced by a compressed stream (this function serves as a proxy for decompression time), and then do a DP to minimise this cost.</p>
]]></description><pubDate>Wed, 15 Jul 2026 18:34:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=48925183</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48925183</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48925183</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)"]]></title><description><![CDATA[
<p>Could you tell me what your test setup and corpus was?<p>For reference, to test ARM64, I tested v0.1.0 on an M3 mac with this fork of lzbench: <a href="https://github.com/welcome-to-the-sunny-side/lzbench/tree/add-misa77" rel="nofollow">https://github.com/welcome-to-the-sunny-side/lzbench/tree/ad...</a><p>Here, lz4's decompression speed was far slower than misa77 and zxc. Results are here: <a href="https://github.com/welcome-to-the-sunny-side/misa77/blob/main/misc/lzbench-results-archive/0.1.0/apple-m3.txt" rel="nofollow">https://github.com/welcome-to-the-sunny-side/misa77/blob/mai...</a></p>
]]></description><pubDate>Wed, 15 Jul 2026 18:13:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=48924921</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48924921</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48924921</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)"]]></title><description><![CDATA[
<p>Hey, glad to hear that you found it interesting.<p>misa77 primarily targets textual data (ie. byte-aligned data formats where each byte corresponds to a symbol), so I hadn't tested it on game assets much until now.<p>After seeing your comment, I pulled some random assets from Pathfinder WoTR (in fact, Unity compresses them with lz4hc) and DOS2. The gains are much more modest here due to asset data being mostly floats, but level 0 performs decently nevertheless.<p>Results on a map asset (WoTR):<p><pre><code>  codec       decode      ratio    encode
  misa77 -0   4061 MB/s   61.52%   40.4 MB/s
  misa77 -1   2851 MB/s   59.04%   36.2 MB/s
  lz4         2561 MB/s   62.66%   488 MB/s
  lz4hc -12   2428 MB/s   55.53%   6.23 MB/s
</code></pre>
Results on equipment asset (WoTR):<p><pre><code>  codec       decode      ratio    encode
  misa77 -0   4675 MB/s   54.33%   48.6 MB/s
  misa77 -1   3752 MB/s   51.96%   40.9 MB/s
  lz4         3101 MB/s   55.21%   497 MB/s
  lz4hc -12   3036 MB/s   47.62%   6.25 MB/s
</code></pre>
Results on texture asset (DOS2):<p><pre><code>  codec       decode      ratio    encode
  misa77 -0   5546 MB/s   67.99%   47.0 MB/s
  misa77 -1   2991 MB/s   63.79%   31.5 MB/s
  lz4         3602 MB/s   68.53%   623 MB/s
  lz4hc -12   2689 MB/s   59.30%   9.01 MB/s
</code></pre>
Note: the benchmarking setup is identical to the intel x86-64 one described in the readme.</p>
]]></description><pubDate>Wed, 15 Jul 2026 17:44:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=48924503</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48924503</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48924503</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)"]]></title><description><![CDATA[
<p>Someone asked this on encode.su too (see my reply here: <a href="https://encode.su/threads/4514-misa77-ridiculously-fast-decompression-at-good-ratios?p=88395&viewfull=1#post88395" rel="nofollow">https://encode.su/threads/4514-misa77-ridiculously-fast-deco...</a>).<p>In short, my decompressor is very simple, and a naive safe version of the decompressor is only about 5% slower than the current unsafe one (and I will add this safe version in v0.3.0).<p>As for the raw throughput numbers being low here, it's because Intel Turbo (frequency boost) was disabled for stability, and the CPU was running at a fixed frequency of 2.1 GHz (I've confirmed that the relative performance scales similarly even with Turbo enabled).</p>
]]></description><pubDate>Wed, 15 Jul 2026 17:37:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=48924378</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48924378</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48924378</guid></item><item><title><![CDATA[Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)]]></title><description><![CDATA[
<p>I've spent the last few months working on this codec.<p>It has the following characteristics:<p><pre><code>  - SOTA decompression throughput in its ratio class
  - Decent ratios (comparable to LZ4 at high effort levels)
  - Slow compression
</code></pre>
Most of the gains can be attributed to reducing branches and making decompression very friendly to out-of-order cores, by using a smart format.<p>Results on the tarred Silesia corpus on Intel x86-64 follow:<p><pre><code>  codec       decode      ratio    encode
  misa77 -0   5219 MB/s   42.64%   54.5 MB/s
  misa77 -1   4274 MB/s   39.65%   51.2 MB/s
  lz4         2505 MB/s   47.59%   371 MB/s
  lz4hc -12   2531 MB/s   36.45%   7.31 MB/s</code></pre></p>
<hr>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=48922838">https://news.ycombinator.com/item?id=48922838</a></p>
<p>Points: 114</p>
<p># Comments: 37</p>
]]></description><pubDate>Wed, 15 Jul 2026 15:58:59 +0000</pubDate><link>https://github.com/welcome-to-the-sunny-side/misa77</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48922838</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48922838</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "Quadrupling code performance with a "useless" if"]]></title><description><![CDATA[
<p>I've also been working on a compressor recently, and the same general idea (letting the compiler know that a data dependency occurs very infrequently, and it should therefore assume none exists to exploit ILP) has allowed me to speed up my decompression by a lot:<p><a href="https://github.com/welcome-to-the-sunny-side/misa77/blob/777f329b30653162ee0ba66fb42d838618d1b030/src/decompress_impl.h#L55-L56" rel="nofollow">https://github.com/welcome-to-the-sunny-side/misa77/blob/777...</a></p>
]]></description><pubDate>Mon, 13 Jul 2026 14:43:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=48893495</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48893495</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48893495</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "AI 2040: Plan A"]]></title><description><![CDATA[
<p>Please seek help. These levels of copium can't possibly be healthy.</p>
]]></description><pubDate>Sun, 12 Jul 2026 18:12:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=48883151</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48883151</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48883151</guid></item><item><title><![CDATA[New comment by nonadhocproblem in "AI 2040: Plan A"]]></title><description><![CDATA[
<p>Are you trolling? OpenAI's models resolved the Cycle Double Conjecture yesterday, which has been an open problem for 50 years.</p>
]]></description><pubDate>Sat, 11 Jul 2026 07:42:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=48869724</link><dc:creator>nonadhocproblem</dc:creator><comments>https://news.ycombinator.com/item?id=48869724</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48869724</guid></item></channel></rss>