Speeding up text file parser (BLAST tabular format)

John Colvin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 15 06:18:34 PDT 2015


On Tuesday, 15 September 2015 at 13:01:06 UTC, Kagamin wrote:
> On Tuesday, 15 September 2015 at 09:19:29 UTC, John Colvin 
> wrote:
>>> It provides you only one char at a time instead of a whole 
>>> line. It will be quite constraining for your code if not 
>>> mind-bending.
>>
>> http://dlang.org/phobos/std_string.html#.lineSplitter
>>
>> File(fileName).byChunk(chunkSize).map!"cast(char[])a".joiner().lineSplitter()
>
> lineSplitter doesn't work with input ranges.

Ugh


More information about the Digitalmars-d-learn mailing list