Also the code above may have problems
when the source & destination overlap,
(which they can if you're just using
memcpy() to shift text).
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi./sec ... not just a good idea, it's the LAW!
> -----Original Message-----
> From: Florent Pillet [mailto:[EMAIL PROTECTED]]
>
>
> > extern inline void *memcpy(void *dst, const void *src, size_t num)
> > {
> > register void *ds = dst;
> > while (num--)
> > *((char *) dst)++ = *((char *) src)++;
> > return ds;
> > }
> >
> > This will run faster but might increase the size somewhat.
>
> Take care with this. I tried various scenarii and found that
> the toolbox
> call "MemMove" is faster than the code above in most cases,
> except when you
> are moving very small amounts of memory (< 16 bytes).
>
>