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: Søren Hauberg
Subject: Re: [octave] file i/o performance
Date: Wed, 25 May 2005 20:03:50 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050404)

Keith Goodman wrote:
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?
I'm surprised - I thought 40 was a pretty big number. But I guess it depends on your usage. I'll send it of to address@hidden now, and then we'll see if jwe will maintain it (C++ is more work to maintain than .m files)

/Søren




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
-------------------------------------------------------------




-------------------------------------------------------------
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]