# HG changeset patch # User Jaroslav Hajek # Date 1251987548 -7200 # Node ID 599e92aaa4c083108968862ac12ab94838098cf0 # Parent 1c76e806c2a7ee46a1435ce10d7a87682079c813 update NEWS diff -r 1c76e806c2a7 -r 599e92aaa4c0 ChangeLog --- a/ChangeLog Thu Sep 03 08:51:45 2009 +0200 +++ b/ChangeLog Thu Sep 03 16:19:08 2009 +0200 @@ -1,3 +1,7 @@ +2009-09-03 Jaroslav Hajek + + * NEWS: Update. + 2009-09-02 Jaroslav Hajek * configure.in (FLOAT_TRUNCATE): New config macro. diff -r 1c76e806c2a7 -r 599e92aaa4c0 NEWS --- a/NEWS Thu Sep 03 08:51:45 2009 +0200 +++ b/NEWS Thu Sep 03 16:19:08 2009 +0200 @@ -81,6 +81,37 @@ ** Octave now allows user-defined subsasgn methods to optimize out redundant copies. For more information, see the manual. + ** When evaluating nested expressions, Octave will now make some attempts to + reuse temporary arrays instead of allocating new one for each result. + For instance, the expression + + -(2*a + b) + + where a and b are arrays, will now be done like this: + + allocate c + for all i: c(i) = 2*a(i) + for all i: c(i) = c(i) + b(i) + for all i: c(i) = -c(i) + c is the result + + previously, a new temporary was allocated for each intermediary result + + allocate c + for all i: c(i) = 2*a(i) + allocate d + for all i: d(i) = c(i) + b(i) + deallocate c + allocate e + for all i: e(i) = -d(i) + deallocate d + e is the result + + This will result in memory saving and less allocations, as well as a modest + performance improvement on most platforms. + Currently, only temporaries on the left-hand side of the operator can be reused, + as well as temporaries subject to unary operators - and !. + Summary of important user-visible changes for version 3.2: ---------------------------------------------------------