Speeding up text file parser (BLAST tabular format)

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 15 02:03:19 PDT 2015


On 15/09/15 9:00 PM, Kagamin wrote:
> On Tuesday, 15 September 2015 at 08:51:02 UTC, Fredrik Boulund wrote:
>> Using char[] all around might be a good idea, but it doesn't seem like
>> the string conversions are really that taxing. What are the arguments
>> for working on char[] arrays rather than strings?
>
> No, casting to string would be incorrect here because the line buffer is
> reused, your original usage of to!string is correct.

I made the assumption it wasn't allocating. Ehhh.


More information about the Digitalmars-d-learn mailing list