<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Leandro Lucarella wrote:
<blockquote cite="mid:20100822215704.GQ1793@llucax.com.ar" type="cite">
  <pre wrap="">Walter Bright, el 22 de agosto a las 12:25 me escribiste:
  </pre>
  <blockquote type="cite">
    <pre wrap=""> 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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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?
  </pre>
</blockquote>
<br>
I can look into grouping it, but be aware I've had a lot of problems
with various linkers trying to get the grouping to work. The Mac linker
in particular behaves very unreliably and buggily with this, and its
behavior changes erratically with each new OSX release. I'd worry about
it not working correctly and the resulting app randomly crashing.<br>
<br>
<blockquote cite="mid:20100822215704.GQ1793@llucax.com.ar" type="cite">
  <pre wrap="">
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.

  </pre>
</blockquote>
</body>
</html>