slow char({str})
Ben Abbott
bpabbott at mac.com
Sun Jun 21 20:11:31 CDT 2009
On Jun 21, 2009, at 8:32 PM, Daniel J Sebald wrote:
> Ben Abbott 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?
>
> The hard part is locating a built-in function named "char".
>
> Dan
It is the first function defined in .../src/strfns.cc
Fixing it is not a task I trust myself with (as my experience with c\c+
+ is mimicing the work of others).
Ben
More information about the Octave-maintainers
mailing list