Mail Archives: djgpp/1996/06/20/06:39:37
richard DOT young AT crc DOT doc DOT ca (Richard Young) wrote:
>> Richard Young wrote:
>> > A question for the optimization experts:
>> > For moving data, is it faster to use
>> >
>> > a) memcpy(x,y,n*sizeof(x[0]))
>> > or
>> > b) for (i = 0; i < n; i++) x[i] = y[i];
>> >
>> > or are they basically the same speed.
>
>
>The results are: NO DIFFERENCE.
>
Note: memcpy speed is independent from selected optimization !
--
Hartmut Schirmer | Phone: +49-431-77572-709 FAX: -703
Automatisierungs- u. Regelungstechnik, | hsc AT techfak DOT uni-kiel DOT d400 DOT de
Technische Fakult"at, Universit"at Kiel,| http://www.techfak.uni-kiel.de/~hsc
Kaiserstr. 2, D-24143 Kiel, Germany | PGP key via WWW, Key ID:6D84AEC1
- Raw text -