From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111115 invoked by alias); 20 Jun 2017 18:28:25 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 111095 invoked by uid 89); 20 Jun 2017 18:28:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*M:charter, H*F:D*charter.net, H*r:InterMail, H*Ad:D*charter.net X-HELO: mtaout004-public.msg.strl.va.charter.net Received: from mtaout004-public.msg.strl.va.charter.net (HELO mtaout004-public.msg.strl.va.charter.net) (68.114.190.29) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Jun 2017 18:28:23 +0000 Received: from impout005 ([68.114.189.20]) by mtaout004.msg.strl.va.charter.net (InterMail vM.9.00.023.01 201-2473-194) with ESMTP id <20170620182820.KAFA3685.mtaout004.msg.strl.va.charter.net@impout005> for ; Tue, 20 Jun 2017 13:28:20 -0500 Received: from [192.168.2.11] ([96.41.215.23]) by impout005 with charter.net id b6UK1v00A0Wrkg0016ULd6; Tue, 20 Jun 2017 13:28:20 -0500 X-Authority-Analysis: v=2.2 cv=VrVTO6+n c=1 sm=1 tr=0 a=salB9WdMPIDduBH7JsZfrA==:117 a=salB9WdMPIDduBH7JsZfrA==:17 a=IkcTkHD0fZMA:10 a=x7bEGLp0ZPQA:10 a=PEscmbOWe0v291i6b-gA:9 a=QEXdDO2ut3YA:10 X-Auth-id: anZkZWxpc2xlQGNoYXJ0ZXIubmV0 Subject: Re: [patch, libfortran, RFC] Speed up cshift with array shift To: fortran@gcc.gnu.org References: From: Jerry DeLisle Message-ID: <3d0e3086-8ea3-f378-a083-189b031aeb56@charter.net> Date: Tue, 20 Jun 2017 18:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00038.txt.bz2 On 06/19/2017 03:34 PM, Thomas Koenig wrote: > Hello world, > > this is an RFC patch for speeding up the other part of cshift. > No mathematical tricks this time, just new functions which > copy the data types instead of using memcpy. > > Performance improvement: > > cpu time cshift dim=1 0.277510017 > cpu time do loop dim=1 0.201206982 > cpu time cshift dim=2 0.514984965 > cpu time do loop dim=2 0.515266180 > cpu time cshift dim=3 1.01037502 > cpu time do loop dim=3 1.03989792 > > vs (gcc 7 without the patch). > > cpu time cshift dim=1 0.492732018 > cpu time do loop dim=1 0.188914001 > cpu time cshift dim=2 0.601395011 > cpu time do loop dim=2 0.462792039 > cpu time cshift dim=3 0.942433834 > cpu time do loop dim=3 1.07195783 > > for the attached test case. So, better if not quite the > performance of straightforward DO loops. > I am curious why the do loops are so much better. Are they being optimized better? Do we need to turn on better optimization for these functions, such as vectorize loops, etc. Jerry