[racket] FlVector optimisations in Typed Racket

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Sun Nov 28 20:19:34 EST 2010

At Sun, 28 Nov 2010 21:57:20 +0000,
Noel Welsh wrote:
> I'm curious if
>   (define-type Foo (Vector Float Float Float))
> will turn into a FlVector,

It won't. Vectors may escape into code that expects actual vectors,
not float vectors, so we can't do the conversion. With a bit of escape
analysis, we may be able to do it when vectors don't escape, though.

> and similarly, if
>   (define-type Foo (FlVector Float Float Float)
> will use avoid range checks (i.e. use unsafe refs) like the Vector defn would.

That's not there yet either. It shouldn't be too long to add, though.
I'll add that to my to-do list. 


Posted on the users mailing list.