[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: surface cdata property restricted to double or uint8
From: |
Jaroslav Hajek |
Subject: |
Re: surface cdata property restricted to double or uint8 |
Date: |
Mon, 30 Aug 2010 11:02:26 +0200 |
On Mon, Aug 30, 2010 at 10:09 AM, Michael Goffioul
<address@hidden> wrote:
> On Mon, Aug 30, 2010 at 6:12 AM, Jaroslav Hajek <address@hidden> wrote:
>> If I see right, however, you save the space for lda doubles, but there
>> are already two arrays of 3*lda doubles around (cmapv and av), which
>> means you'll save 14% memory at best. That is really not much in
>> Octave's context. I would likewise prefer the simpler change.
>
> Don't think it's true. cmapv is just a pointer to the internal figure colormap
> array, which already exists (no temp array created) and is *not* of size
> 3*lda.
> "NDArray a" is actually the only array created in that function.
>
Whether or not an array is temporary is not that much relevant; the
important point is that the array is hanging around. If I'm working
with arrays of 10^7 doubles, saving a temp of 10^6 doubles is
marginal, even though it may be a huge saving otherwise. But you're
indeed right that cmapv is not 3*lda long. So put 25% there.
> That function was written with both memory and performance in mind, as it
> called on every redraw (this also means for instance when rotation), and
> the amount of data (cdata) can be quite large.
>
OK, I wasn't questioning the original code's performance.
--
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Re: surface cdata property restricted to double or uint8, (continued)
- Re: surface cdata property restricted to double or uint8, Shai Ayal, 2010/08/30
- Re: surface cdata property restricted to double or uint8, John W. Eaton, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Shai Ayal, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, John W. Eaton, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8,
Jaroslav Hajek <=
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, John W. Eaton, 2010/08/30