D and Nim

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 4 16:53:50 PST 2015


On 1/4/2015 1:46 PM, Ary Borenszweig wrote:
> Nim is faster than D.

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.



More information about the Digitalmars-d mailing list