octave-maintainers
[Top][All Lists]
Advanced

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

Re: C++ version of regexprep.cc


From: Paul Kienzle
Subject: Re: C++ version of regexprep.cc
Date: Tue, 2 May 2006 15:06:31 -0400


On May 2, 2006, at 10:57 AM, David Bateman wrote:

I just noted, you didn't state whether this improved the speed of your xml code sufficiently or not... Or whether there is a another speed problem elsewhere.

mat2cell is slower than I expect.  It needs an OCTAVE_QUIT in its loop.

The particular file that I'm trying to load is 500 kb, with about 6000 separate values, so 12000 separate open/close tags, and 24000 elements in the partition. I was expecting this to take a couple of seconds but instead it takes 2 1/2 minutes.

Running some tests, the behaviour of mat2cell is quadratic over [1000,10000]. Looking at the code I can't tell why.

You can try running 'speed' on it (I'm not tunneling X so I can't right now):

        speed("v=mat2cell(s,1,p);","s=repmat('a',1,n);p=ones(1,n);",10000);


mat2cell is still fast compared to the for loop in xml2mat which builds the cell structure from the xml.

At this point I'm going to declare defeat and say that xml2mat won't run on octave with large files in reasonable time.

- Paul



reply via email to

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