]> git.ipfire.org Git - thirdparty/zstd.git/commit
Fix ZSTD_execSequence() performance regression 431/head
authorNick Terrell <terrelln@fb.com>
Thu, 27 Oct 2016 23:19:54 +0000 (16:19 -0700)
committerNick Terrell <terrelln@fb.com>
Thu, 27 Oct 2016 23:19:57 +0000 (16:19 -0700)
commit10bfd0c0d5c584c5015c5a3a34436f7025fac325
treead7d27508de2b1c06d1bf346f1b807237e11e2dc
parentee5b72582389835d02c4c94e51cc998f9fce540a
Fix ZSTD_execSequence() performance regression

Commit ae1cb3b3d07024618269b89e3421d828adfd34d9 caused the regression.
It is an instruction alignment issue, because if it is `U64 i` instead
of `U32 i`, the regression returns.  This patch fixes the regression
in gcc, but only gets some of the clang performance back.

Benchmarks:
Run on `silesia.tar`.  I only show levels 1-5 because the performance
regression was uniform across all levels.  I did one run on levels
1-19 and it looked good.

| Build | Level | Before | While | After |
|-------|-------|-------:|------:|------:|
| gcc   |     1 |  931.4 | 904.4 | 932.8 |
| gcc   |     2 |  849.1 | 822.6 | 851.2 |
| gcc   |     3 |  815.6 | 790.6 | 818.9 |
| gcc   |     4 |  794.1 | 770.7 | 798.0 |
| gcc   |     5 |  785.7 | 760.7 | 788.8 |
| clang |     1 |  705.5 | 683.2 | 693.8 |
| clang |     2 |  670.0 | 649.2 | 660.7 |
| clang |     3 |  659.6 | 639.8 | 651.4 |
| clang |     4 |  652.5 | 634.7 | 645.9 |
| clang |     5 |  646.9 | 625.5 | 637.7 |
lib/decompress/zstd_decompress.c