[dmd-internals] Giving better static data limits to the GC
Leandro Lucarella
luca at llucax.com.ar
Sun Aug 22 14:57:04 PDT 2010
Walter Bright, el 22 de agosto a las 12:25 me escribiste:
> I know this is probably really low priority for DMD, but any answer
> would be appreciated, even if it is something like "no idea how doable
> it is, it would take time to think about it and is low priority" :)
>
>
> I don't think spending a lot of effort on the static data is worthwhile,
> as very little of modern programs should consist of static mutable data.
>
> What's held me back from adding in precise scanning data for everything is
> the large expansion of the memory footprint of a program to hold all this
> data.
Thanks for the answer. My experiments show that static data is relevant.
Comparing 2 GC implementations, one with very few types (druntime
implementation) and another using a few more types, including a couple
of templates, the second is measurably slower. The types generates
a *lot* of rw static data.
Even when I agree that it might be too much to add type information to
the static data, grouping only the static data that should be scanned
(i.e. D-only global variables, and leaving out all the
TypeInfo/ClassInfo) can make a big difference.
Would that be too hard?
Right now I'm under the serious dilemma of whether I should got back to
the more messy way of coding (with few types) or pay the price, which is
a very hard decision because I don't want to make the code uglier but
I don't want to have a slower GC either.
Thanks.
--
Leandro Lucarella (AKA luca) http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Se va a licitar un sistema de vuelos espaciales mendiante el cual, desde una
plataforma que quizás se instale en la provincia de Córdoba. Esas naves
espaciales va a salir de la atmósfera, va a remontar la estratósfera y desde
ahí elegir el lugar donde quieran ir de tal forma que en una hora y media
podamos desde Argentina estar en Japón, en Corea o en cualquier parte.
-- Carlos Saúl Menem (sic)
More information about the dmd-internals
mailing list