Mercurial > octave-nkf
changeset 8588:79845b1793cf
optimize cell construction from a cs-list
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sun, 25 Jan 2009 08:04:56 +0100 |
parents | 35656d6ad061 |
children | 0131fa223dbc |
files | src/ChangeLog src/pt-cell.cc |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Jan 24 21:27:07 2009 +0100 +++ b/src/ChangeLog Sun Jan 25 08:04:56 2009 +0100 @@ -1,3 +1,7 @@ +2009-01-24 Jaroslav Hajek <highegg@gmail.com> + + * pt-cell.cc (tree_cell::rvalue): Optimize the single row case. + 2009-01-24 Jaroslav Hajek <highegg@gmail.com> * ov-struct.cc (octave_struct::subsasgn): Reshape cs-list on rhs
--- a/src/pt-cell.cc Sat Jan 24 21:27:07 2009 +0100 +++ b/src/pt-cell.cc Sun Jan 25 08:04:56 2009 +0100 @@ -60,7 +60,10 @@ octave_value_list row = elt->convert_to_const_vector (); - if (nc < 0) + if (nr == 1) + // Optimize the single row case. + val = row.cell_value (); + else if (nc < 0) { nc = row.length ();