[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vector typing
From: |
Marius Vollmer |
Subject: |
Re: vector typing |
Date: |
Mon, 29 May 2006 22:55:15 +0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Dave Griffiths" <address@hidden> writes:
> Are f32 better for speed reasons anyway?
Depends. If your inner loops are written in C, then using f32 or f64
vectors should be faster, as fast as C float or double arrays. If you
use them from Scheme, then every f32vector-ref will have to box the
element (i.e., it has to alloc from the cell heap), which is likely
slower than using a normal vector, since normal vectors store their
elements in boxed form.
> Why can't I access them with the vanilla vector-ref/vector-set! etc?
Good question. :-) One possible answer is: for the same reason that
you can't access strings with vector-ref, and vectors not with
list-ref.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405