Re: [Scheme-reports] Procedural equivalence: the last debate John Cowan (05 Jun 2013 01:42 UTC)
Re: [Scheme-reports] Procedural equivalence: the last debate taylanbayirli@gmail.com (05 Jun 2013 13:25 UTC)

Re: [Scheme-reports] Procedural equivalence: the last debate John Cowan 05 Jun 2013 01:42 UTC

Alex Shinn scripsit:

> Is the idea basically to transform:
>
>   (let ((f (lambda ...)))
>     (... f ...)
>     ...
>     (... f ...))
>
> into:
>
>   (let ((f (lambda ...))
>          (location (generate-unique-value)))
>     (... (box f location) ...)
>     ...
>     (... (box f location) ...))

Just so.

> Using addresses wouldn't work, generate-unique-value
> would have to increment a global counter (which need
> not be unique to this location).  Though if the counter
> ever overflows into a bignum all optimization is lost.

Just use the address of any one copy of the procedure.

--
Yes, chili in the eye is bad, but so is your    John Cowan
ear.  However, I would suggest you wash your    cowan@ccil.org
hands thoroughly before going to the toilet.    http://www.ccil.org/~cowan
        --gadicath

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports