OCTAVE_LOCAL_BUFFER

John W. Eaton jwe at octave.org
Mon Dec 15 18:43:31 CST 2008


On 15-Dec-2008, Jaroslav Hajek wrote:

| I guess that depends on what typical usage is, but I guess that no. A
| simple experiment I've just conducted shows that the whole "make
| check" process ran on a single chunk, allocating ~12500 buffers in
| total.

How about leaving some code in to collect statistics and having a
function to return them?

| But I think that there are
| still a couple more places where an Array or a std::vector or
| something else is used as a local buffer.

Yes, look at the places in the xMatrix.cc files where fortran_vec is
used on locally created Array objects.  Many of these appear to be
work arrays that are passed to Fortran subroutines.  They could use
OCTAVE_LOCAL_BUFFER instead.

| Maybe we can experiment with the best settings here. For instance,
| buffers larger than 1/8 chunk size will be allocated as stand-alone,
| so that there are always at least 8 buffers per chunk. But it's
| another guess - maybe 1/4 would suffice.

Is this something else that should be configurable with an environment
variable?

| Since there's no need to have this
| fixed during compilation, what about an environment variable?

I think that's OK.  Since it is not likely to be used often, I don't
see the need to have a command-line option.

jwe


More information about the Octave-maintainers mailing list