[OT] Why mobile web apps are slow

deadalnix deadalnix at gmail.com
Tue Jul 16 18:39:34 PDT 2013


On Tuesday, 16 July 2013 at 18:21:05 UTC, Jonathan A Dunlap wrote:
>> You can also make use of library types for reference counting,
>>
>> http://dlang.org/phobos/std_typecons.html#.RefCounted
>>
>> And if you really, really need, also manual memory management 
>> by calling the C functions and letting the GC know not to 
>> track that memory.
>>
>> http://dlang.org/phobos/core_memory.html#.GC.BlkAttr.NO_SCAN
>
> Fascinating! I assume the Phobos RefCounted then avoids using 
> the GC by utilizing GC.malloc (NO_SCAN) behind the scenes? Has 
> anyone benchmarked an application using D's GC versus using 
> RefCounted for critical paths?

I highly advice not to use the NO_SCAN unless you really know 
what you are doing. Not that the GC will trigger only when enough 
memory is allocated, so if you deallocate most memory manually, 
the GC won't trigger often.


More information about the Digitalmars-d mailing list