[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ version of regexprep.cc
From: |
John W. Eaton |
Subject: |
Re: C++ version of regexprep.cc |
Date: |
Tue, 2 May 2006 20:01:05 -0400 |
On 3-May-2006, David Bateman wrote:
| I think I've eliminated the quadratic behavior of mat2cell with the
| attached version. I now get
|
| octave:1> n = 1000;
| octave:2> s = repmat('a',1,n);p=ones(1,n);
| octave:3> tic;v=mat2cell(s,1,p);toc
| Elapsed time is 0.021194 seconds.
| octave:4> tic;v=mat2cell(s,1,p);toc
| Elapsed time is 0.013100 seconds.
| octave:5> n = 5000;
| octave:6> s = repmat('a',1,n);p=ones(1,n);
| octave:7> tic;v=mat2cell(s,1,p);toc
| Elapsed time is 0.044708 seconds.
| octave:8> n = 10000;
| octave:9> s = repmat('a',1,n);p=ones(1,n);
| octave:10> tic;v=mat2cell(s,1,p);toc
| Elapsed time is 0.088394 seconds.
|
| which is much more respectable. Does this help your xml2mat code, or are
| there other points that are slow?
If you agree that this version is working well enough now, then please
commit it. Probably it should go in ov-cell.cc. Also, to match all
the other doc strings in Octave now, the @seealso line should go just
before the @end deftypefn line.
Thanks,
jwe
- Re: C++ version of regexprep.cc, (continued)
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/02
- Re: C++ version of regexprep.cc, Tom Holroyd (NIH/NIMH) [E], 2006/05/02
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/02
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/02
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/02
- Re: C++ version of regexprep.cc,
John W. Eaton <=
- Re: C++ version of regexprep.cc, Tom Holroyd, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/03
- Re: C++ version of regexprep.cc, John W. Eaton, 2006/05/03
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/03
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/03
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/04
- Re: C++ version of regexprep.cc, Alois Schloegl, 2006/05/04
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/04
- Re: C++ version of regexprep.cc, Andy Adler, 2006/05/04