Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 11 Jul 2013 00:33:48 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Thinking about release

On Wed, Jul 10, 2013 at 11:30:47PM -0500, Strake wrote:
> On 09/07/2013, Andre Renaud <andre@...ewatersys.com> wrote:
> > I wasn't too sure on memmove, but I've seen a reasonable amount of
> > code which just uses memmove as standard (rather than memcpy), to
> > avoid the possibility of overlapping regions. Not a great policy
> 
> Why? What loss with memmove? That it takes 1.0125 times as long as
> memcpy, other than when memcpy might just trash the array or summon
> nasal demons anyhow?

If you're performing a copy between objects that overlap, or if you're
not sure whether you might be, then it's very likely that you'd doing
something wrong. Or at least that's my opinion.

Anyway I have no objection to an optimized memmove, but I do think
starting with just memcpy is easier for review and
cleanup/optimization.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.