A few notes on choosing between Go and D for a quick project

Laeeth Isharc via Digitalmars-d digitalmars-d at puremagic.com
Sun Mar 22 05:59:28 PDT 2015


On Saturday, 21 March 2015 at 15:09:32 UTC, Andrei Alexandrescu 
wrote:
> On 3/20/15 9:43 PM, Sebastiaan Koppe wrote:
>> On Saturday, 21 March 2015 at 01:31:21 UTC, Andrei 
>> Alexandrescu wrote:
>>> On 3/20/15 5:56 PM, Walter Bright wrote:
>>>> On 3/20/2015 5:23 PM, Andrei Alexandrescu wrote:
>>>>> Yah, and uses reference counting for management. -- Andrei
>>>>
>>>> Ref counting won't improve splitLines, because it must keep 
>>>> them all.
>>>
>>> Yah, all solution based on "let's keep all lines so we count 
>>> them at
>>> the end" are suboptimal. -- Andrei
>>
>> What about `.count("\n")` ?
>
> Using "count" is among the solutions I measured: 
> http://stackoverflow.com/questions/28922323/improving-line-wise-i-o-operations-in-d/29153508#29153508 
> -- Andrei

Fwiw I get similar timings to python and pypy using LDC optimized 
and the others are not bad.  Maybe it is a Windows specific 
problem (I use arch).  (Posted to SO).




More information about the Digitalmars-d mailing list