>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
Hrvoje> sperber(a)informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
writes:
> >> a) Add them as another datatype comletely separate from
Elisp
> >> fixnums, with explicit coercions back and forth.
> >>
> >> This, I believe, is possible with minimal changes to the Elisp
> >> machine, even though it's still a sufficiently hairy job, 'cause
> >> you need to interface with the garbage collector in a suitable
> >> way.
>
Hrvoje> Not hairy at all. Have you looked at
Hrvoje> DEFINE_LRECORD_IMPLEMENTATION? It allows you to specify a
Hrvoje> callback routine for the GC.
>
> I wasn't thinking about tracing, but rather about the fact that
> (according to my totally naive view of how efficient bignum
> arithmetic works), with some bignum operations, it may not be
> possible to know the size of the result without actually computing
> it.
Hrvoje> I still don't understand the problem. Even if it is true that the
Hrvoje> size of the resulting number is unknown (and I am not convinced in
Hrvoje> this!),
Huh? Subtract two very large numbers from each other. The only way I
see of finding out how big the result is is to perform the
subtraction.
Hrvoje> you are still quite free to use realloc() and friends to
Hrvoje> adjust the size incrementally.
Not if the bignum is supposed to live in the Emacs Lisp heap.
--
Cheers =8-} Chipsy
Friede, Völkerverständigung und überhaupt blabla