From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3621 Path: news.gmane.org!not-for-mail From: Andre Renaud Newsgroups: gmane.linux.lib.musl.general Subject: Re: Thinking about release Date: Thu, 11 Jul 2013 10:44:16 +1200 Message-ID: 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=UTF-8 X-Trace: ger.gmane.org 1373496269 2587 80.91.229.3 (10 Jul 2013 22:44:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jul 2013 22:44:29 +0000 (UTC) Cc: musl@lists.openwall.com To: Andre Renaud Original-X-From: musl-return-3625-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jul 11 00:44:31 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 1Ux37d-00064D-H3 for gllmg-musl@plane.gmane.org; Thu, 11 Jul 2013 00:44:29 +0200 Original-Received: (qmail 23895 invoked by uid 550); 10 Jul 2013 22:44:28 -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 23884 invoked from network); 10 Jul 2013 22:44:28 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=x8y/K863+4NgMSSjOyQvBge+n8VDKYkizrNikJ5miLc=; b=WeZAwsJ9A1UsC2Yp2bT2Nhi/7jM/Pr6ZxtH23PJGX+WkL4Y2RRHQV2jzZyTaIv5SNa iYwtQqjNpgfx84hwXARi58l9gLL68LV/cSI8MH3WV79Pl2S9hHB8+dF5aA9sNYbbhYP/ +ZTuHyLvQMGFz0Q/v7ZFZaIf5p5wGfTR9XDYmprz/C6Y4sz1RagrySoMsdqgv98UiqSp m/ATLa05MrZd0wZZmGDYKoYp741oxF1ZyWcsn1Xn+zxuEKy9CJi5PUmpOO/y/o5vHF2T is4b6/5PqpyIb3qcHbWRbNsdAbfUWRvssopBCyrX2AgGc8qqBGdeEmbbZcVjJw27/oXu GJkA== X-Received: by 10.220.114.135 with SMTP id e7mr20269814vcq.17.1373496257028; Wed, 10 Jul 2013 15:44:17 -0700 (PDT) In-Reply-To: X-Gm-Message-State: ALoCoQmuNpjeJkyocsEhjbtdFmk9EIeJ8jugJuf3LjkNjgjhBpXawb56A7L9Jlo7dh7wp5DQcfht Xref: news.gmane.org gmane.linux.lib.musl.general:3621 Archived-At: > This results in 95MB/s on my platform (up from 65MB/s for the existing > memcpy.c, and down from 105MB/s with the asm optimised version). It is > essentially identically readable to the existing memcpy.c. I'm not > really famiilar with any other cpu architectures, so I'm not sure if > this would improve, or hurt, performance on other platforms. Reviewing the assembler that is produced, it appears that GCC will never generate an ldm/stm instruction (load/store multiple) that reads into more than 4 registers, where as the optimised assembler does them that read 8 (ie: 8 * 32bit reads in a single instruction). I've tried various tricks/optimisations with the C code, and can't convince GCC to do more than 4. I assume that this is probably where the remaining 10MB/s is between these two variants. Rich - do you have any comments on whether either the C or assembler variants of memcpy might be suitable for inclusion in musl? Regards, Andre