Thanks, buildman -B localises it well, and there is an easy win in it.

Almost all the growth is the new Huffman fast-decode path in 1.5.7. turris_mox
and mvebu_espressobin-88f3720 give identical breakdowns, text +1896 rodata +24:

  HUF_decompress4X1_usingDTable_internal                 -    1508   +1508
  HUF_readDTableX1_wksp                                  8    1312   +1304
  HUF_decompress4X1_usingDTable_internal_fast_c_loop     -    1092   +1092
  FSE_decompress_wksp_bmi2                               4     316    +312

Upstream guards that path with HUF_DISABLE_FAST_DECODE. Adding it to the
CONFIG_ZSTD_LIB_MINIFY flags in lib/zstd/Makefile, beside the
HUF_FORCE_DECOMPRESS_X1 and DYNAMIC_BMI2=0 already there, takes turris_mox from
+1920 to +236 bytes against 1.5.2. Sandbox ut lib still passes 133 tests with 0
failures, including both zstd cases.

Trading decode speed for size is what MINIFY is for, so it looks like it
belongs there rather than on by default.

Want that as a separate patch on top? I did not fold it in because it changes
behaviour for existing MINIFY users, not just the library version.

Reply via email to