public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/60780] Equivalence statements in nested modules results in fast growing duplicate statements in module files
Date: Mon, 09 Mar 2015 10:22:00 -0000	[thread overview]
Message-ID: <bug-60780-4-8o7YriH1pw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60780-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60780

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I have doubled the number of modules to get the following results

gcc version 4.8.5

21.907u 0.994s 0:23.00 99.5%    0+0k 0+22io 3pf+0w

-rw-r--r-- 1 dominiq staff     2923 Mar  9 10:59  module0.mod
-rw-r--r-- 1 dominiq staff     3079 Mar  9 10:59  module1.mod
-rw-r--r-- 1 dominiq staff     4230 Mar  9 10:59  module2.mod
-rw-r--r-- 1 dominiq staff     6376 Mar  9 10:59  module3.mod
-rw-r--r-- 1 dominiq staff    10512 Mar  9 10:59  module4.mod
-rw-r--r-- 1 dominiq staff    18628 Mar  9 10:59  module5.mod
-rw-r--r-- 1 dominiq staff    34704 Mar  9 10:59  module6.mod
-rw-r--r-- 1 dominiq staff    66700 Mar  9 10:59  module7.mod
-rw-r--r-- 1 dominiq staff   130536 Mar  9 10:59  module8.mod
-rw-r--r-- 1 dominiq staff   258052 Mar  9 10:59  module9.mod
-rw-r--r-- 1 dominiq staff   512931 Mar  9 10:59 module10.mod
-rw-r--r-- 1 dominiq staff  1022530 Mar  9 10:59 module11.mod
-rw-r--r-- 1 dominiq staff  2041569 Mar  9 10:59 module12.mod
-rw-r--r-- 1 dominiq staff  4079488 Mar  9 10:59 module13.mod
-rw-r--r-- 1 dominiq staff  8155167 Mar  9 10:59 module14.mod
-rw-r--r-- 1 dominiq staff 16306366 Mar  9 10:59 module15.mod
-rw-r--r-- 1 dominiq staff 32608774 Mar  9 10:59 module16.mod

gcc version 4.9.3

5.432u 0.389s 0:06.00 96.8%    0+0k 8+19io 1355pf+0w

-rw-r--r-- 1 dominiq staff    485 Mar  9 11:03  module0.mod
-rw-r--r-- 1 dominiq staff    498 Mar  9 11:03  module1.mod
-rw-r--r-- 1 dominiq staff    526 Mar  9 11:03  module2.mod
-rw-r--r-- 1 dominiq staff    560 Mar  9 11:03  module3.mod
-rw-r--r-- 1 dominiq staff    602 Mar  9 11:03  module4.mod
-rw-r--r-- 1 dominiq staff    668 Mar  9 11:03  module5.mod
-rw-r--r-- 1 dominiq staff    770 Mar  9 11:03  module6.mod
-rw-r--r-- 1 dominiq staff    952 Mar  9 11:03  module7.mod
-rw-r--r-- 1 dominiq staff   1279 Mar  9 11:03  module8.mod
-rw-r--r-- 1 dominiq staff   1911 Mar  9 11:03  module9.mod
-rw-r--r-- 1 dominiq staff   3165 Mar  9 11:03 module10.mod
-rw-r--r-- 1 dominiq staff   5650 Mar  9 11:03 module11.mod
-rw-r--r-- 1 dominiq staff  10603 Mar  9 11:03 module12.mod
-rw-r--r-- 1 dominiq staff  20493 Mar  9 11:03 module13.mod
-rw-r--r-- 1 dominiq staff  40276 Mar  9 11:03 module14.mod
-rw-r--r-- 1 dominiq staff  79811 Mar  9 11:03 module15.mod
-rw-r--r-- 1 dominiq staff 158891 Mar  9 11:03 module16.mod

gcc version 5.0.0

5.525u 0.381s 0:06.06 97.3%    0+0k 9+23io 1605pf+0w

-rw-r--r-- 1 dominiq staff    485 Mar  9 11:07  module0.mod
-rw-r--r-- 1 dominiq staff    500 Mar  9 11:07  module1.mod
-rw-r--r-- 1 dominiq staff    529 Mar  9 11:07  module2.mod
-rw-r--r-- 1 dominiq staff    562 Mar  9 11:07  module3.mod
-rw-r--r-- 1 dominiq staff    606 Mar  9 11:07  module4.mod
-rw-r--r-- 1 dominiq staff    672 Mar  9 11:07  module5.mod
-rw-r--r-- 1 dominiq staff    774 Mar  9 11:07  module6.mod
-rw-r--r-- 1 dominiq staff    956 Mar  9 11:07  module7.mod
-rw-r--r-- 1 dominiq staff   1283 Mar  9 11:07  module8.mod
-rw-r--r-- 1 dominiq staff   1915 Mar  9 11:07  module9.mod
-rw-r--r-- 1 dominiq staff   3170 Mar  9 11:07 module10.mod
-rw-r--r-- 1 dominiq staff   5650 Mar  9 11:07 module11.mod
-rw-r--r-- 1 dominiq staff  10603 Mar  9 11:07 module12.mod
-rw-r--r-- 1 dominiq staff  20493 Mar  9 11:07 module13.mod
-rw-r--r-- 1 dominiq staff  40276 Mar  9 11:07 module14.mod
-rw-r--r-- 1 dominiq staff  79811 Mar  9 11:07 module15.mod
-rw-r--r-- 1 dominiq staff 158891 Mar  9 11:07 module16.mod

gcc version 5.0.0 with the patch in pr40958 comment 18

0.045u 0.034s 0:00.24 29.1%    0+0k 12+18io 1767pf+0w

-rw-r--r-- 1 dominiq staff  485 Mar  9 11:07  module0.mod
-rw-r--r-- 1 dominiq staff  500 Mar  9 11:07  module1.mod
-rw-r--r-- 1 dominiq staff  515 Mar  9 11:09  module2.mod
-rw-r--r-- 1 dominiq staff  527 Mar  9 11:09  module3.mod
-rw-r--r-- 1 dominiq staff  539 Mar  9 11:09  module4.mod
-rw-r--r-- 1 dominiq staff  552 Mar  9 11:09  module5.mod
-rw-r--r-- 1 dominiq staff  567 Mar  9 11:09  module6.mod
-rw-r--r-- 1 dominiq staff  578 Mar  9 11:09  module7.mod
-rw-r--r-- 1 dominiq staff  590 Mar  9 11:09  module8.mod
-rw-r--r-- 1 dominiq staff  603 Mar  9 11:09  module9.mod
-rw-r--r-- 1 dominiq staff  621 Mar  9 11:09 module10.mod
-rw-r--r-- 1 dominiq staff  632 Mar  9 11:09 module11.mod
-rw-r--r-- 1 dominiq staff  647 Mar  9 11:09 module12.mod
-rw-r--r-- 1 dominiq staff  663 Mar  9 11:09 module13.mod
-rw-r--r-- 1 dominiq staff  677 Mar  9 11:09 module14.mod
-rw-r--r-- 1 dominiq staff  692 Mar  9 11:09 module15.mod
-rw-r--r-- 1 dominiq staff  728 Mar  9 11:09 module16.mod

Without the patch the module sizes double each time a module is added
(asymptotic behavior) while the prefactor for 4.9 and 5.0 is ~200 smaller
compared to 4.8. With the patch, the compile time is negligible and the module
sizes increase is quite small (linear?).

May be the patch should be submitted to fortran@gcc.gnu.org (for next stage1).


  parent reply	other threads:[~2015-03-09 10:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 17:27 [Bug fortran/60780] New: " russelldub at gmail dot com
2014-04-07 17:41 ` [Bug fortran/60780] " russelldub at gmail dot com
2014-04-09  8:27 ` dominiq at lps dot ens.fr
2014-10-08  1:58 ` russelldub at gmail dot com
2014-10-08  2:00 ` russelldub at gmail dot com
2015-03-09 10:22 ` dominiq at lps dot ens.fr [this message]
2015-03-09 18:49 ` jvdelisle at gcc dot gnu.org
2015-03-09 18:57 ` dominiq at lps dot ens.fr
2015-03-11  5:12 ` russelldub at gmail dot com
2015-06-05 16:55 ` kargl at gcc dot gnu.org
2015-06-05 20:41 ` kargl at gcc dot gnu.org
2015-06-05 20:42 ` kargl at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-60780-4-8o7YriH1pw@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).