tex3ds icon indicating copy to clipboard operation
tex3ds copied to clipboard

lzss.cpp: use memcmp to optimize match-checking

Open ds-sloth opened this issue 1 year ago • 0 comments

I recently started work on a stripped-down library fork of this tool for use in a conversion toolkit. While doing some profiling I found that the hottest code was in the LZ11 compression procedure. On my x86 machine at least, switching to memcmp rather than a manual loop for the comparison up to best_len sped up conversion overall by a factor of 4. Maybe this change will be useful to you upstream as well.

ds-sloth avatar Sep 07 '24 14:09 ds-sloth