From: Sascha S. <sas...@fr...> - 2005-07-30 12:29:57
|
On Sunday 24 July 2005 00:11, Sascha Sommer wrote: > On Saturday 23 July 2005 22:11, Robert L Krawitz wrote: > > From: Sascha Sommer <sas...@fr...> > > Date: Sat, 23 Jul 2005 19:59:07 +0200 > > > > canon_fold_2bit looks very similar to stp_fold in bit-ops.c > > > > Have you tested this? > > Yes, I didn't notice any visual differences. > > Also note that with both functions you have got, a standing for the first > char in input, b for the char at the last position > a7,a6,a5,a4,a3,a2,a1,a0 > b7,b6,b5,b4,b3,b2,b1,b0 > > after the first codeblock the first byte of the output is: > b7,a7,b6,a6,b5,a5,b4,a4 > > after the 2nd codeblock the 2nd byte of the output is: > b3,a3,b2,a2,b1,a1,b0,a0 > > As you can see the bits simply get shifted around and | and + therefore act > identical. > > The if l0 || or l1 only avoids useless computations afaik. > Commited. Sascha |