|
From: | John W. Eaton |
Subject: | Re: Rethinking octave_idx_type |
Date: | Sat, 26 Nov 2016 17:27:36 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 |
On 11/25/2016 11:35 PM, Rik wrote:
Other than performance, I think it does make sense to become more compatible with the STL. I don't think we have to switch to an unsigned type though. 2^63 = 9 x 10^18 elements and if each element is an IEEE double that would be 70 exabytes. I don't know of any personal PCs that would need the extra bit of addressing from an unsigned type because they actually have 140 exabytes of memory.
Using size_t (which is unsigned) helps compatibility with the STL because that's what it uses for sizes and indexing. But I agree it is not absolutely necessary. We already get away with using a signed type and have dealt with most of the places where compilers warn about mixing signed and unsigned types.
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |