From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3625 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Thinking about release Date: Thu, 11 Jul 2013 00:33:48 -0400 Message-ID: <20130711043348.GM29800@brightrain.aerifal.cx> References: <20130613012517.GA5859@brightrain.aerifal.cx> <20130613014314.GC29800@brightrain.aerifal.cx> <20130709053711.GO29800@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1373517242 30119 80.91.229.3 (11 Jul 2013 04:34:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Jul 2013 04:34:02 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3629-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jul 11 06:34:04 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Ux8Zt-0004gU-IM for gllmg-musl@plane.gmane.org; Thu, 11 Jul 2013 06:34:01 +0200 Original-Received: (qmail 5531 invoked by uid 550); 11 Jul 2013 04:34:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5523 invoked from network); 11 Jul 2013 04:34:00 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3625 Archived-At: On Wed, Jul 10, 2013 at 11:30:47PM -0500, Strake wrote: > On 09/07/2013, Andre Renaud 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