D and Nim

Joseph Rushton Wakeling via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 4 17:06:48 PST 2015


On 05/01/15 01:53, Walter Bright via Digitalmars-d wrote:
> I bet the D version would be significantly faster if you didn't read the file as
> a text string, then try breaking it up into an array of lines, then break those
> lines up into an array of strings, etc. This is a lot of memory allocation.
>
> Instead, open the file and use byLine() on it, which does not allocate memory.

The timing shouldn't include the breaking up into strings etc., only the actual 
calculation of the longest path.  Are you concerned that some kind of GC event 
might be being triggered, skewing the timing of the latter?



More information about the Digitalmars-d mailing list