GC vs. Manual Memory Management Real World Comparison

Iain Buclaw ibuclaw at ubuntu.com
Wed Sep 5 08:08:57 PDT 2012


On 5 September 2012 15:57, bearophile <bearophileHUGS at lycos.com> wrote:
> Benjamin Thaut:
>
>> http://3d.benjamin-thaut.de/?p=20#more-20
>
>
> Regardind your issues list, most of them are fixable, like the one regarding
> array literals, and even the one regarding the invariant handler.
>

I have no clue what the issue with invariant handlers is...  Calls to
them are not emitted in release code, and if you think they are, then
you've probably built either your application, or the library you are
using wrong.

Array literals are not so easy to fix.  I once thought that it would
be optimal to make it a stack initialisation given that all values are
known at compile time, this infact caused many strange SEGV's in quite
a few of my programs  (most are parsers / interpreters, so things that
go down *heavy* nested into itself, and it was under these
circumstances that array literals on the stack would go corrupt in one
way or another causing *huge* errors in perfectly sound code).



-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d-announce mailing list