Re: 8088 LZSS+RLE decompression: Can this be improved?



Samuel Stearley wrote:
The original problem laid out is for it to beat memcpy(). The only way
to do this is with fast RLE

Well, duh! :-)

Of course RLE is needed to beat a single REP MOVS opcode, the problem is this: Given that there are enough runs (which ends up as REP STOS) to beat the naive version, what is the fastest way to implement it?

The answer is quite obviously a 'compiled sprite', i.e. a set of asm instructions to directly output the wanted result. This approach touches the minimum possible number of bytes, while avoiding all tests/jumps/branches.

Terje
--
- <Terje.Mathisen@xxxxxxxxxxxxx>
"almost all programming can be viewed as an exercise in caching"

.