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

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

[Octave-bug-tracker] [bug #51871] loading '-ascii' format files is slow


From: Rik
Subject: [Octave-bug-tracker] [bug #51871] loading '-ascii' format files is slow
Date: Thu, 31 Aug 2017 14:44:56 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #19, bug #51871 (project octave):

I reviewed the latest patch and updated it a bit.  See
speed-up-load-ascii-v4.patch attached.

Mostly it was Octave coding conventions, but I did decide to use


return T (0.0);


from the template str2fp_num rather than just "return 0;".

I also used xelem rather than elem which will be slightly faster since it
won't check that the row and column indices are valid on each access (we
already know they are)


-              tmp.elem (i, j) = d;
+              tmp.xelem (i, j) = d;




(file #41705)
    _______________________________________________________

Additional Item Attachment:

File name: speed-up-load-ascii-v4.patch   Size:10 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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