[plt-scheme] build-vector avoids sharing problem

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Fri Feb 7 08:11:44 EST 2003

> For (2), I assume I want to use a Scheme->C
> translator like Gambit.

It seems that Stalin produces the fastest code for
this sort of problem.  Along as you keep your types
straight it should do very well on normal Scheme.  To
get fast code out of Gambit you have to tell it you're
using homogenous arrays (SRFI-4) and use the
monomorphic maths operators (fx+ or equivalent)

> But will Gambit etc. accept Advanced Student
> constructions?  


> Can I front-end a macro that say turns (local
((define ...
> ))) into a
> (letrec ... ) construction?  Will Gambit accept the
> macro?  
Yes.  Gambit only has low-level macros out of the box,
but I think there is a syntax-case add-in.

> This problem must come up a lot, how do you deal
> with it?

Generally by only writing in a subset of Scheme that
you know is supported by all your target compilers. 
It's an unfortunate state of affairs.


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

Posted on the users mailing list.