octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50561] 350X slower code for eps() written in


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #50561] 350X slower code for eps() written in C++ rather than an m-file
Date: Thu, 16 Mar 2017 16:32:17 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

Follow-up Comment #7, bug #50561 (project octave):

What assignment above are you referring to?  Looking at the whole routine, I
see now that

"retval = epsval"

is actually a large array assignment.  So clearly that was a huge reassignment
of an array every time in the loop.

Did you try the things you mention before making the retval = epsval move? 
After that retval=epsval move, maybe the more granular details you listed will
now start to make a difference, improving things even further.

Also, if this retval is a large array, stack construct, does the C++ compiler
optimize that out?  Or would it make sense to rather than assign retval =
epsval, do things more direct with:


          return epsval;
[snip]
              return epsval;
[snip]
    return fill_matrix (args, std::numeric_limits<double>::epsilon (),


?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50561>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]