|
Boost : |
Subject: Re: [boost] [xint] Question about suitability, portability, and "Boostiness"
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2010-04-13 02:25:58
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/13/2010 02:03 AM, Scott McMurray wrote:
>> And in exchange, every function in the library that uses the internals
>> of the integer -- and there are several -- would need to have
>> special-case handling for small numbers. Not worth the trade-off.
>
> And don't they already need it for your "quick digits"?
No. There's a "digits" pointer; I just point it to the small QuickDigits
array, and only the allocation and deallocation functions need to know
anything about its existence. Everything else just uses whatever
"digits" points to, either the QuickDigits array or an allocated one.
After restructuring the code, there won't be any need for a separate
QuickDigits array to prevent a second allocation -- a single allocation
will be sufficient. Or even no allocations, if I put a small array in
the main integer class itself for small numbers; but again, that would
be wasted space for anything larger.
- --
Chad Nelson
Oak Circle Software, Inc.
*
*
*
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvEDnIACgkQp9x9jeZ9/wTLFQCfV+AXuxqmA+ocH2FloKd4VLBT
y8oAoK4Sqn9FPpFt2e7HohnGxfD+IXaP
=PX5k
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk