[m-rev.] diff: improve simplify_info

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Mar 8 13:03:15 AEDT 2017



On Wed, 8 Mar 2017 12:40:50 +1100, Peter Wang <novalazy at gmail.com> wrote:

> On Wed, 08 Mar 2017 12:25:13 +1100 (AEDT), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> > 
> > I was under the impression that there was much more rounding up
> > of allocation sizes, though that came from what Fergus told me about
> > much older versions of Boehm. Any idea *when* that changed? I just looked
> > on Hans Boehm's gc page, and in "git blame" for the seemingly-relevant
> > gc header files in the boehm directory, and did not find that information.
> 
> I'm not sure that it ever rounded up to powers of two.
> 
> You can look at older tarball imports in the bdwgc repository.
> The oldest tag is 'gc1_9'.  size_map exists in misc.c
> https://github.com/Mercury-Language/bdwgc/blob/gc1_9/misc.c#L37

With ALIGN_DOUBLE, and MAXSZ set to 64, that code yields the size map
below. So it seems that I was wrong about all boundaries being powers of 2,
but right about there being much rounding up, and one of the boundaries
being 32 bytes, i.e. 8 words on the old 32 bit machines. That was why
changes to data structures to make the top level 8 words in size, with
the less frequently used fields in a sub_info structure, were speedups.

Zoltan.

 1 ->  2
 2 ->  2
 3 ->  4
 4 ->  4
 5 ->  6
 6 ->  6
 7 ->  8
 8 -> 12
 9 -> 12
10 -> 12
11 -> 12
12 -> 12
13 -> 20
14 -> 20
15 -> 20
16 -> 20
17 -> 20
18 -> 20
19 -> 20
20 -> 20
21 -> 32
22 -> 32
23 -> 32
24 -> 32
25 -> 32
26 -> 32
27 -> 32
28 -> 32
29 -> 32
30 -> 32
31 -> 32
32 -> 32
33 -> 50
34 -> 50
35 -> 50
36 -> 50
37 -> 50
38 -> 50
39 -> 50
40 -> 50
41 -> 50
42 -> 50
43 -> 50
44 -> 50
45 -> 50
46 -> 50
47 -> 50
48 -> 50
49 -> 50
50 -> 50
51 -> 64
52 -> 64
53 -> 64
54 -> 64
55 -> 64
56 -> 64
57 -> 64
58 -> 64
59 -> 64
60 -> 64
61 -> 64
62 -> 64
63 -> 64
64 -> 64


More information about the reviews mailing list