From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110785 invoked by alias); 5 Apr 2015 13:48:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 110762 invoked by uid 89); 5 Apr 2015 13:48:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout2.netcologne.de Received: from cc-smtpout2.netcologne.de (HELO cc-smtpout2.netcologne.de) (89.1.8.212) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 05 Apr 2015 13:48:20 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout2.netcologne.de (Postfix) with ESMTP id 9118186CD5; Sun, 5 Apr 2015 15:48:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id 8D83F11E23; Sun, 5 Apr 2015 15:48:15 +0200 (CEST) Received: from [78.35.151.51] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.0.6) (envelope-from ) id 55213d1f-0bdb-7f0000012729-7f0000018a6d-1 for ; Sun, 05 Apr 2015 15:48:15 +0200 Received: from [192.168.178.20] (xdsl-78-35-151-51.netcologne.de [78.35.151.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Sun, 5 Apr 2015 15:48:13 +0200 (CEST) Message-ID: <55213D1C.904@netcologne.de> Date: Sun, 05 Apr 2015 13:48:00 -0000 From: Thomas Koenig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jerry DeLisle , "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [patch, fortran, RFC] First steps towards inlining matmul References: <55212B5D.6010309@netcologne.de> <552136A1.1020706@charter.net> In-Reply-To: <552136A1.1020706@charter.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-04/txt/msg00166.txt.bz2 Hi Jerry, > I am curious about what performance gain results from this? I can see > saving a library call to our runtime libraries. Do you have some timing > results? The speedup can be quite drastic for small matrices which can be completely unrolled by -O3: b1.f90: program main use b2 implicit none real, dimension(3,3) :: a, b, c integer :: i call random_number(a) call random_number(b) do i=1,10**8 c = matmul(a,b) call bar(b,c) end do end program main b2.f90: module b2 contains subroutine bar(b,c) real, dimension(3,3) :: b,c end subroutine bar end module b2 ig25@linux-fd1f:~/Krempel/Matmul> gfortran -O3 -fno-frontend-optimize b2.f90 b1.f90 && time ./a.out real 0m15.411s user 0m15.404s sys 0m0.001s ig25@linux-fd1f:~/Krempel/Matmul> gfortran -O3 b2.f90 b1.f90 && time ./a.out real 0m1.736s user 0m1.735s sys 0m0.001s