[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: crc32() optimization
> email@example.com said:
> > 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.
> You could add 'CFLAGS_crc32.o := -funroll-loops' to the Makefile. Not sure
> how you'd manage it only for certain architectures. I suppose you could try
> cetting CFLAGS_crc32.o in arch/$(ARCH)/Makefile. The name 'crc32.o' should
> probably be unique -- anyone else with that file name should probably be
> using the one in lib/ anyway :)
Nice, then it's at least possible to do it on file level.
I guess I should add 'CFLAGS_crc32.o := -funroll-loops' to lib/Makefile in
the 2.4 CRC backport for all arch's. I can't hurt anyone, right?
Still, it would be nice with an individual #pragma or something.
> Note that the new code in 2.5, which you're backporting, has the crc32
> functions in crc32.c; the old code had them inline so you'd actually need to
> use -funroll-loops on the whole jffs2 subdirectory.
Yup. I like the inline version. It will be more efficient for all those
constant length's crc32 calls in JFFS2. One could have both and test
a compile time for a constant length and inline in those cases, but
then you really need the #pragma thing, which seems to be nonexistent.
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to firstname.lastname@example.org