[uClibc] improved memcpy/memset on arm in uClibc-0.9.19

Markus Pietrek maillist at fsforth.de
Wed Sep 17 07:30:49 UTC 2003


Hi Manuel,

> > My code works only on the assumption that the memory is 32bit aligned and
> > no Wchar are used, the block size is large enough (>>0x38 bytes) to
> > complement the overhead and of course it is an ARM.
> >
> > So my questions are
> > o with these restrictions, does it make sense to put the code in this
> > general library?
>
> I'm all for providing fast versions of the mem*/str* functions.  But
> any such optimized functions will have to be standards-compliant, and
> there is no requirement regarding memory alignment of the buffers these
> functions operate on.  Actually, optimizing the wmem*/wcs* functions
> would be simpler because you do have some alignment information.

Sorry for being unprecise. Of course any libc function must behave like the 
specification. So, memcpy() must check itself whether the requirements are 
fullfilled for an optimized approach. But of course this bloats the code, so 
my version is about 4-5 times larger than the standard one :-(

> Probably easist to simply have seperate subdirs for each arch that
> supplies optimimized versions of given functions.  Then, after all
> the generics were built, the optimized versions could be built and
> stored in the libary thereby overriding the generic versions.
>
> But I'll talk to Erik about.

Thanks.

-- 
Markus Pietrek
FS Forth-Systeme GmbH
Phone: +49 (7667) 908 145,  FAX +49 (7667) 908 221





More information about the uClibc mailing list