Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uakari.primate.wisc.edu!ames!ncar!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.lang.c Subject: Re: memcpy versus assignment Message-ID: <509@bbxsda.UUCP> Date: 4 Jan 90 15:26:01 GMT References: <1657@uwm.edu> <1989Dec31.005904.1910@utzoo.uucp> <1175@ramz.UUCP> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Organization: Basis International, Albuquerque, NM Lines: 12 I recall a '286 C compiler that generated a series of MOVS instructions to move structures. I figured that for small structures this was faster than the overhead required to call a memcpy() routine. Just for yuks one day I defined a structure with a 1000 element int array in it. The C compiler generated tons and tons of MOVS instructions (talk about un-rolling a loop :-). -- Scott Amspoker Basis International, Albuquerque, NM (505) 345-5232 unmvax.cs.unm.edu!bbx!bbxsda!scott