help-octave
[Top][All Lists]
Advanced

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

Re: [octave] file i/o performance


From: Keith Goodman
Subject: Re: [octave] file i/o performance
Date: Wed, 25 May 2005 09:50:33 -0700

On 5/25/05, Søren Hauberg <address@hidden> wrote:
> >>I had parts of strcmp implemented in C++, so I just finished it. For the
> >>tests I have performed this is about 40 times faster than the version
> >>shipped with Octave. Use it if you like...

It's 100 times faster for what I typically do. How do we get it into Octave?

>> x = cellfun("char(rand(1,8)*(1*'z' - 1*'a') + 1*'a')",cell(1000,1));
>> tic;strcmp(x,x{13,:});toc
ans = 0.010574
>> tic;strcmp(x,x{13,:});toc
ans = 0.0026650
>> tic;strcmp(x,x{13,:});toc
ans = 0.0023830
>> tic;strcmp(x,x{13,:});toc
ans = 0.0026950
>> cd ..
>> clear strcmp
>> tic;strcmp(x,x{13,:});toc
ans = 0.33405
>> tic;strcmp(x,x{13,:});toc
ans = 0.32350
>> tic;strcmp(x,x{13,:});toc
ans = 0.32281
>> tic;strcmp(x,x{13,:});toc
ans = 0.32319
>>
>> 0.322/0.0025
ans = 128.80
>>



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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