[Gc] Re: Performance of bdwgc7.2 had degraded compared to6.8 - I
think I found a solution/reason
Johannes Totz
jtotz at imperial.ac.uk
Sat Mar 5 20:01:15 PST 2011
On 05/03/2011 18:38, Manuel.Serrano at inria.fr wrote:
> Hi Carsten,
>
> I have tried the following in reclaim.c but I have not noticed any
> performance difference between BGL_MEMCPY1, BGL_MEMCPY2, and
> default. What have you tried exactly?
>
> -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
> --- gc/bdwgc-7_2alpha5-20110107/reclaim.c 2010-03-05 15:26:16.000000000 +0100
> +++ /tmp/reclaim.c 2011-03-05 19:32:05.000000000 +0100
> @@ -142,9 +142,25 @@
> }
> # else
> p++; /* Skip link field */
> +#define BGL_MEMCPY1
> +#if defined( BGL_MEMCPY1 )
> + switch ( (q-p) % 4 ) {
> + while (p < q ) {
> + case 0: *p++ = 0;
> + case 1: *p++ = 0;
> + case 2: *p++ = 0;
> + case 3: *p++ = 0;
> + }
> + }
> +#else
> +# if defined( BGL_MEMCPY2 )
> + memcpy( p, 0, (q-p)*sizeof(p) );
I didn't check what this code is supposed to do, but judging from the
surrounding fragments this should be a memset instead, no?
> +# else
> while (p < q) {
> *p++ = 0;
> }
> +# endif
> +#endif
> # endif
> }
> bit_no += MARK_BIT_OFFSET(sz);
> -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
More information about the Gc
mailing list