[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when GC is permitted

This page is part of the web mail archives of SRFI 50 from before July 7th, 2015. The new archives for SRFI 50 contain all messages, not just those from before July 7th, 2015.

Tom Lord <lord@xxxxxxx> writes:
>     > (BTW, Tom will be quite disappointed with what GCC's optimizer
>     > will do to Pika-style code; go and try it.)
> You need to be much more specific.  

You made a post before discussing how this would be optimized:

      list2 (scheme_value answer,
             scheme_instance instance,
             scheme_value * a,
             scheme_value * b)
	struct my_frame
          scheme_value nil;
          scheme_value last_pair;
        } f; 

        SCHEME_GCPRO (f);

        SCHEME_MAKE_NIL (&f.nil, instance);
        SCHEME_CONS (&f.last_pair, instance, b, &f.nil);
        SCHEME_CONS (answer, instance, a, &f.last_pair);

        SCHEME_GCUNPRO (my_frame);

Maybe my comment should have swaggered less, but it's been my
experience that GCC is pretty conservative about optimizing memory