[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: crc32() optimization

> On Mon, 2002-11-11 at 13:18, Joakim Tjernlund wrote:
> > Yes CRC is a pig, this is why I am trying to do something about it.
> > I think there is more to gain if you look at Algorithm 4 at  
> > http://www.cl.cam.ac.uk/Research/SRG/bluebook/21/crc/node6.html#SECTION00060000000000000000
> > since the current algorithm basically is Algorithm 3 in above link.
> gcc knows about loop unrolling. On x86 your code appears to be slower
> since it uses more space and the compiler knows not to unroll it.

Found the -funroll-loops option and applied it to the fs/jffs2 code with 
the orginal crc32.h. Results were impressive: JFFS2 scan time is now 1.83

Next I applied -funroll-loops to the whole kernel and this time scand time 
increased to 1.93 seconds

Now I wonder: Is there a #pragma or something that will allow me to 
unroll individual functions. I have looked allover but no luck so far.


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com