octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63791] movfun - high intermediate memory use


From: Rik
Subject: [Octave-bug-tracker] [bug #63791] movfun - high intermediate memory use for moderate data input resulting in out of memory errors
Date: Thu, 2 Mar 2023 16:55:23 -0500 (EST)

Update of bug #63791 (project octave):

                  Status:         Patch Submitted => Fixed                  
             Open/Closed:                    Open => Closed                 
           Fixed Release:                    None => 9.1.0 (current default)
         Planned Release:                    None => 9.1.0 (current default)

    _______________________________________________________

Follow-up Comment #37:

It turns out that the extra memory for slcidx is caused by a caching mechanism
within the octave_base_matrix class in ov-base-mat.h.  This caching mechanism
is, overall, a good thing and is useful for movfun which will calculate the
slcidx variable once and then apply it again and again to each column of the
input.  The particular motivating example in this bug report has only one
column so there is no particular benefit, but in the general case there would
be.

The total memory required is roughly


3 * N * wlen * 8 bytes


where N is the number of elements along the dimension that movfun operates
over.  I checked in a change
(http://hg.savannah.gnu.org/hgweb/octave/rev/31430ca3644b) that reduces the
pre-factor constant to 2.5 for most cases (17% memory savings) and in some
cases to 2.25 (25% memory savings).

Combined with the try/catch improvement I think movfun is sufficiently
improved now that this bug can be closed.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63791>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]