This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52473] CSHIFT slow - inline it?
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 May 2017 12:00:23 +0000
- Subject: [Bug fortran/52473] CSHIFT slow - inline it?
- Auto-submitted: auto-generated
- References: <bug-52473-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52473
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc dot gnu.org
--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 41394
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41394&action=edit
Benchmark of straight DO loops vs. library version
Some numbers from
https://groups.google.com/forum/#!topic/comp.lang.fortran/AI0F1Vpkc3I
show that using straight DO loops could both help and hurt:
$ ./a.out
Testing explicit DO loops
Dim = 1 Elapsed CPU time = 2.82861114
Dim = 2 Elapsed CPU time = 2.93245506
Dim = 3 Elapsed CPU time = 2.94523525
Testing built-in cshift
Dim = 1 Elapsed CPU time = 1.65619278
Dim = 2 Elapsed CPU time = 2.80988693
Dim = 3 Elapsed CPU time = 7.13671684
I'll see what could be done using an explicit call to memcpy
for the innermost loops.