octave-maintainers
[Top][All Lists]
Advanced

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

Re: slow char({str})


From: Jaroslav Hajek
Subject: Re: slow char({str})
Date: Wed, 24 Jun 2009 08:39:13 +0200

On Wed, Jun 24, 2009 at 8:34 AM, Daniel J Sebald<address@hidden> wrote:
> Jaroslav Hajek wrote:
>
>>>> Please check
>>>> http://hg.savannah.gnu.org/hgweb/octave/rev/4ff6f8efdda2
>>>>
>>>> also transplanted into 3.2.x.
>>>>
>>>> thanks
>>>
>>> Very nice Jaroslav.  Which of these changes is the speedup coming from?
>>> This hunk
>>>
>>> -       elem (i, j) = s[i][j];
>>> +       elem (i, j) = si[j];
>>>
>>> shouldn't have been too much as there is only a little extra computation
>>> in
>>> the indexing before the change.
>>
>>
>> No. In fact, this *was* the bottleneck, changing a linear complexity
>> operation to quadratic one. Welcome to the world of COW magic.
>
> Oh yeah, s is a reference, not a pointer...
>
> What does COW stand for, other than can of worms?
>
> Dan
>

Copy-On-Write

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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