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

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

[Octave-bug-tracker] [bug #56752] Performance slowdown from version 3.2.


From: anonymous
Subject: [Octave-bug-tracker] [bug #56752] Performance slowdown from version 3.2.4 through to current dev branch
Date: Mon, 12 Aug 2019 15:22:33 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:60.9) Goanna/4.1 PaleMoon/28.2.0a1

Follow-up Comment #4, bug #56752 (project octave):

If it can help I translated bm.toeplitz.orig.m to toeplitz_oct.cc it also is
attached to the post.



//toeplitz_oct.cc
#include <octave/oct.h>
#include "builtin-defun-decls.h"

DEFUN_DLD (toeplitz_oct, args, nargout,"")
{
        #define OV octave_value
        OV runs ( 5.0);
        OV cumulate (0.0);
        OV b (0.0);
        for (double i = 1.0; i <= runs.double_value(); i++)
        {
                b = Fzeros(ovl(OV(620.0),OV(620.0)),1)(0);
                Ftic(ovl(),0);
                for (double j = 1.0; j <= 620.0; j++)
                {
                        for (double k = 1.0; k <= 620.0; k++)
                        {
                                std::list<octave_value_list> idx ;
        idx.push_back(ovl(OV(k),OV(j)));
                                OV rhs =  Fplus(ovl(Fabs(ovl(Fminus(ovl(OV(j), 
OV(k)), 1)(0)), 1)(0),
OV(1.0)), 1)(0);
                                b.subsasgn( "(" , idx, rhs );
                        }
                }
                octave_value timing (Ftoc(ovl(),1)(0));
                cumulate = Fplus(ovl(cumulate,timing),1)(0);
        }
        return ovl(cumulate);
}



(file #47332)
    _______________________________________________________

Additional Item Attachment:

File name: toeplitz_oct.cc                Size:0 KB
    <https://savannah.gnu.org/file/toeplitz_oct.cc?file_id=47332>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56752>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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