Open GoogleCodeExporter opened 8 years ago
The problem was with
#define HASH_FUNCTION(v,p) { v = *((const flzuint16*)p); v ^= *((const
flzuint16*)(p+1))^(v>>(16-HASH_LOG));v &= HASH_MASK; }
This caused misaligned accesses. This caused bus error on sparc,
or if compiled such that those misaligned accesses are trapped,
so many traps that it became useless (used 75 times as long time).
After I changed it to
#define HASH_FUNCTION(v,p) { v = p[0]<<8 | p[1]; \
v ^= (p[1]<<8|p[2])^(v>>(16-HASH_LOG));v &= HASH_MASK; }
It works very good.
Very fast.
Original comment by thwill...@gmail.com
on 16 Jun 2007 at 2:31
Thanks for the test and the fix!
At the moment, I can't declare that FastLZ is flawless on RISC and/or 64-bit
machine.
But I'm working towards that (still testing it under Itanium and Xeon, which
have the
same problem with alignment).
Original comment by ariya.hi...@gmail.com
on 18 Jun 2007 at 9:19
Original issue reported on code.google.com by
thwill...@gmail.com
on 15 Jun 2007 at 4:02