[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] More efficient numbers integration through
From: |
cowan |
Subject: |
Re: [Chicken-hackers] [PATCH] More efficient numbers integration through "scratchspace" |
Date: |
Tue, 21 Apr 2015 09:47:50 -0400 |
User-agent: |
SquirrelMail/1.4.21 |
Peter Bex scripsit:
> That's right. That's why I described it as "an extension of the nursery":
> it isn't actually stored on the stack,
So it could be allocated in the heap or simply as a global array.
Since there is only one at a time, and its size is fixed, a global array
would make sense to me, even though it allocates a little extra space
that isn't used in programs that don't have bignums.
> You're right about the wrapper objects: Currently, only bignum data
> string objects are allocated in scratchspace.
Ah. Your original posting confused me on this point. So a procedure
returning a rectnum in the form <digits1>/<digits2>+<digits3>/<digits4>i
will allocate four bignum digit string objects in the scratch space, two
ratnums on the stack, and one rectnum on the stack (assuming the
digit strings are big enough and relatively prime).
--
John Cowan http://www.ccil.org/~cowan address@hidden
"Awk!" sed Grep. "A fscking python is perloining my Ruby; let me bash
him with a Cshell! Vi didn't I mount it on a troff?" --Francis Turner
Re: [Chicken-hackers] [PATCH] More efficient numbers integration through "scratchspace", Felix Winkelmann, 2015/04/21