------- Comment #22 from dominiq at lps dot ens dot fr 2008-02-01 16:41 ------- For large values of n, most of the time is spent in gfc_append_constructor, starting from 5% and up to 92%. Most of the remaining time is spent in find_array_section, starting from 75% down to 2.5%. Although I did not follow closely the algorithm, I got it is basically quadratic (for an intrinsically linear problem). Also, each time gfc_get_constructor is called, there is a call to "gfc_getmem (sizeof(gfc_constructor))".
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19925