Date: Wed, 21 Oct 1998 08:57:35 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Ludvig Larsson cc: djgpp AT delorie DOT com Subject: Re: superslow simpel rep stosl, why? In-Reply-To: <362D2BD1.28EA@club-internet.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Wed, 21 Oct 1998, Ludvig Larsson wrote: > the memory chunk to clear is just allocated with malloc(). malloc returns aligned memory, but do you clear the buffer starting at the beginning of what malloc returned? For example, the following snippet will get tremendously slowed-down by unaligned accesses: unsigned char *buf = (unsigned char *) malloc (buf_size); clear_buf (buf + 1, buf_size - 1); (where clear_buf stands for your inline assembly stuff).