[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #8783] C++ implementation of textscan
From: |
Lachlan Andrew |
Subject: |
[Octave-patch-tracker] [patch #8783] C++ implementation of textscan |
Date: |
Thu, 11 Feb 2016 12:46:33 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #40, patch #8783 (project octave):
It is impossible to have a completely stand-alone version -- at least without
terrible inefficiency.
Consider a file containing the string "0.1234+0.1234i 0", and the sequence of
statements
textscan (fd, "%f", 1);
textscan (fd, "%f", 1);
The first reads only a single number (the complex one) and the second reads
0.
Now consider that the "i" is absent from the file. The first read should
return 0.1234 and the second should also return 0.1234. To do that, textscan
must leave the file's read position at the "+" sign, but it had to read ahead
until the "i" (or subsequent space) to decide whether or not to stop there.
Unless we can seek backwards (which Octave currently disallows), the only way
we can implement that is to count how many characters we have read, close the
file, and re-read the appropriate number of characters.
I use textscan on a 60GB file. Re-reading the entire file after each call is
not an option...
For the moment, let's wait for our kind OSX testers to see how this works.
Let me know what you'd like me to do w.r.t. the dbstop issues. I'll try to
give MXE a go over the weekend.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8783>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/02/03
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/03
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/04
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/10
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/02/10
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan,
Lachlan Andrew <=
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/02/11
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, John W. Eaton, 2016/02/11
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/12
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/02/12
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/12
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/12
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/12
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/02/13
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/13
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/02/13