Re: Custom String vs D String performance

2016-09-05 Thread Patric via Digitalmars-d-learn
On Monday, 5 September 2016 at 12:03:49 UTC, Patric wrote: On Monday, 5 September 2016 at 11:53:12 UTC, Daniel Kozak wrote: Do you have windows or linux? Which version of dmd you have? Now on my job pc: DMD32 D Compiler v2.071.0-b2 In home i have 64 last version, and with my first version it

Re: Custom String vs D String performance

2016-09-05 Thread Patric via Digitalmars-d-learn
On Monday, 5 September 2016 at 11:55:09 UTC, rikki cattermole wrote: Be a bit careful there, when a struct is moved around its destructor will be called. This is why I suggested you to use the GC to allocate memory or else ouch. So you'll find very quickly that you will be having segfaults

Re: Custom String vs D String performance

2016-09-05 Thread Patric via Digitalmars-d-learn
On Monday, 5 September 2016 at 11:53:12 UTC, Daniel Kozak wrote: Do you have windows or linux? Which version of dmd you have? Now on my job pc: DMD32 D Compiler v2.071.0-b2 In home i have 64 last version, and with my first version it shows the DString faster than my custom.

Re: Custom String vs D String performance

2016-09-05 Thread rikki cattermole via Digitalmars-d-learn
On 05/09/2016 11:45 PM, Patric wrote: On Monday, 5 September 2016 at 11:20:08 UTC, rikki cattermole wrote: On 05/09/2016 11:11 PM, Patric wrote: 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 pe

Re: Custom String vs D String performance

2016-09-05 Thread Daniel Kozak via Digitalmars-d-learn
Dne 5.9.2016 v 13:45 Patric via Digitalmars-d-learn napsal(a): On Monday, 5 September 2016 at 11:20:08 UTC, rikki cattermole wrote: On 05/09/2016 11:11 PM, Patric wrote: I´m playing remaking D functionalities with nogc structs, and to at least match D performance. But in this particular case

Re: Custom String vs D String performance

2016-09-05 Thread Patric via Digitalmars-d-learn
On Monday, 5 September 2016 at 11:20:08 UTC, rikki cattermole wrote: On 05/09/2016 11:11 PM, Patric wrote: 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

Re: Custom String vs D String performance

2016-09-05 Thread Daniel Kozak via Digitalmars-d-learn
Dne 5.9.2016 v 13:20 rikki cattermole via Digitalmars-d-learn napsal(a): ... Don't forget to disable the GC as well so it doesn't try to collect during the tests. This is not true, in many cases it will hurt performance a lot

Re: Custom String vs D String performance

2016-09-05 Thread Guillaume Piolat via Digitalmars-d-learn
On Monday, 5 September 2016 at 11:11:23 UTC, Patric wrote: 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 b

Re: Custom String vs D String performance

2016-09-05 Thread rikki cattermole via Digitalmars-d-learn
On 05/09/2016 11:11 PM, Patric wrote: 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

Re: Custom String vs D String performance

2016-09-05 Thread Daniel Kozak via Digitalmars-d-learn
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 ou

Re: Custom String vs D String performance

2016-09-05 Thread Daniel Kozak via Digitalmars-d-learn
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 mag

Custom String vs D String performance

2016-09-05 Thread Patric via Digitalmars-d-learn
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/1c