Custom String vs D String performance

Daniel Kozak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 5 04:19:21 PDT 2016


Dne 5.9.2016 v 13:17 Daniel Kozak napsal(a):

> Dne 5.9.2016 v 13:11 Patric via Digitalmars-d-learn napsal(a):
>
>> I´m playing remaking D functionalities with nogc structs, and to at 
>> least match D performance.
>> But in this particular case i´m unable to get near D performance.  
>> Can someone point me out what i´m doing wrong, or if there is some 
>> magic behind the curtains on D strings?
>>
>> https://dpaste.dzfl.pl/1c981fdc71ac
>
> One of reason could be GC, because I belive in D string it reuse 
> memory, but in your case you always do malloc
>

BTW on my pc your Custom String is faster than D string



More information about the Digitalmars-d-learn mailing list