September 05, 2016 Re: Custom String vs D String performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | 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 since you will be doing use after free.
>
Iep, the full code have the postblit operator to correct this :)
|
September 05, 2016 Re: Custom String vs D String performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Patric | 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 shows the DString faster than my custom.
Well, if my opBinary implementation is right (in the performance sense also), so is a matter of Platform not of implementation, and i´m ok with that :)
But I find strange this kind of discrepancy.
|
Copyright © 1999-2021 by the D Language Foundation