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: Tue, 29 Aug 2017 20:54:35 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Update of bug #51871 (project octave):

                  Status:               Confirmed => In Progress            

    _______________________________________________________

Follow-up Comment #10:

I think accepting 'na' would just be nice.  If you're using a bare ASCII file
for data transfer between various programs then it is possible that some other
piece of SW wrote everything out in lower case.

As for accepting comments, what does Matlab do?  The existing Octave code that
was rewritten accepted comments, so in order not to introduce a regression we
should probably keep things the way they are.  But we could open a new bug
report and discussion about removing that feature from the Octave load
function.

I tested bypassing tolower and the savings were really minimal so I think it
makes sense, for code clarity, to just use the library function.  But I
changed tolower to toupper so that I can test for 'N' and 'A' which looks
better than 'n' and 'a' given that this is how Octave writes the constant.

I also switched from using erase() to pop_back() since we are guaranteed C++11
now for Octave code.  I made other minor changes for clarity and to follow
Octave coding conventions.

I'm seeing a 45% reduction in load times with this patch, call it about 1/2
the time it used to take.

I've attached the latest version of this cset to the bug report.  I can't
commit it yet because it causes new failures in the test suite.  For example,
'test dlmread.cc' has errors.  This is probably something to do with how the
stream positioning gets set.



(file #41696)
    _______________________________________________________

Additional Item Attachment:

File name: ascload.cset                   Size:7 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]