slow char({str})
Ben Abbott
bpabbott at mac.com
Mon Jun 22 07:00:59 CDT 2009
On Jun 22, 2009, at 3:01 AM, Jaroslav Hajek wrote:
> On Sun, Jun 21, 2009 at 7:33 PM, Ben Abbott<bpabbott at mac.com> wrote:
>> I noticed a substantial amount of time is needed to convert a cell
>> string
>> into a string
>>
>> octave:50> tic; char ({repmat("a", [1, 100000])}); toc
>> Elapsed time is 11.9 seconds.
>>
>> but ...
>>
>> octave:51> tic; char ({repmat("a", [1, 100000])}{1}); toc
>> Elapsed time is 0.001117 seconds.
>>
>> Can someone with skilled in c++ take a look?
>>
>> Ben
>>
>
> Please check
> http://hg.savannah.gnu.org/hgweb/octave/rev/4ff6f8efdda2
>
> also transplanted into 3.2.x.
>
> thanks
Works for me!
octave:4> tic; char ({repmat("a", [1, 100000])}); toc
Elapsed time is 0.00583291 seconds.
Thanks
Ben
More information about the Octave-maintainers
mailing list