[gambit-list] problem with load.
christian at pflanze.mine.nu
Wed Jun 20 19:41:21 EDT 2007
Marc Feeley wrote:
> On 20-Jun-07, at 4:45 PM, |/|/ Bendick wrote:
>> Is it possible to have gambit use two words for it's headers on a
>> 32-bit machine?
What about using a vector of vectors? This would require one more level
of indirection, but that's quite cheap(*), doesn't have any relevant
limit, and doesn't require changes to the core.
(* structures defined with define-type/-structure are notoriously slow
when compiled safely, but that's because of the type checking or
something (could that be sped up, Marc?). You could just use a special
symbol in the first position of the outer level vector for your type
checking, so that you don't need more nesting, this way it should be
For homogenous vectors, you could also use the ffi (with c-lambda or
##c-code) and malloc for writing your own representation (should only be
some 30-50 lines of code or so).
> Anything is possible of course. But this adds extra space and time
> overheads on vector-like object operations (strings, u8vectors,
> vectors, ...). I don't think its worth the trouble (after all very
> few people complain about this limitation). An alternative that is
> less costly to implement is to encode the length in number of *words*
> instead of bytes.
(I'm using ___HD_BYTES(___HEADER(obj)) in some places to determine the
length of an object in bytes.)
More information about the Gambit-list