|
From: | John W. Eaton |
Subject: | Re: Rethinking octave_idx_type |
Date: | Mon, 28 Nov 2016 07:54:27 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 |
On 11/26/2016 11:41 PM, Rik wrote:
My main idea is that we start to consider performance, [...] That's why I would like to know whether there is much of a difference in runtimes for the test suite between the 32-bit and 64-bit versions of Octave. Or whether the resident set size for the Octave binary is appreciably different between the two.
OK.
If we change the typedef for octave_idx_type then I think we should make several small changes rather than one large destabilizing change. It would be better to move to ssize_t first, where we would only need to modify the interaction with the Fortran libraries, rather than size_t, where we would also have to find and correct every single instance where negative values are used with octave_idx_type.
Yes, this was my plan.The first step is to use F77_INT instead of octave_idx_type to declare integer variables that are passed to Fortran functions. Currently F77_INT is always the same as octave_idx_type, but it shouldn't have to be. Next, allow F77_INT to be whatever is used by the Fortran libraries on the system while octave_idx_type can be ssize_t (or ptrdiff_t, or whatever signed type it is that has the same number of bits as size_t). Then switch octave_idx_type to just be size_t. Then finally maybe replace the octave_idx_type typedef with size_t and just use size_t unconditionally for indexing and dimensions as other software typically does.
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |