[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slowup in 2.1.54
From: |
David Bateman |
Subject: |
Re: Slowup in 2.1.54 |
Date: |
Wed, 18 Feb 2004 10:26:16 +0100 |
User-agent: |
Mutt/1.4.1i |
According to Dmitri A. Sergatskov <address@hidden> (on 02/17/04):
>
> cputime does not work with pthreads, so I have to use tic/toc.
> Here is another example of recursion slowdown:
>
> 2.1.53:
>
> tic; for n=1:1000; bm_x=sylvester_matrix(7) ; endfor ; toc
> ans = 4.2025
>
> 2.1.54:
>
> tic; for n=1:1000; bm_x=sylvester_matrix(7) ; endfor ; toc
> ans = 11.574
Ok, I confirm your results, as
2.1.50:
tic; for n=1:1000; bm_x=sylvester_matrix(7) ; endfor ; toc
ans = 6.1742
2.1.54:
tic; for n=1:1000; bm_x=sylvester_matrix(7) ; endfor ; toc
ans = 40.233
However, what is it in the sylvester_matrix function that makes you think the
problem is due to recursion. There is a line in sylvester_matrix
retval = [tmp, tmp; tmp, -tmp];
I tried replacing this with
retval = 1;
just to check whether the problem was due to recursion or this
concatentaion operation. The results were
2.1.50:
tic; for n=1:1000; bm_x=sylvester_matrix(7) ; endfor ; toc
ans = 2.9223
2.1.54
tic; for n=1:1000; bm_x=sylvester_matrix(7) ; endfor ; toc
ans = 2.6302
So to me the problem is clearly in the concatenation operations, not
the recursion. Interestingly the above allows an estimate of the slowup
in the concatenation operation to be derived as
(40.233 - 2.6302) / (6.1742 - 2.9223) = 11.563
So there is a factor of roughly 11 slowup in the concatenation operations.
Regards
D.
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
- Slowup in 2.1.54, David Bateman, 2004/02/17
- Slowup in 2.1.54, John W. Eaton, 2004/02/17
- Re: Slowup in 2.1.54, Dmitri A. Sergatskov, 2004/02/17
- Re: Slowup in 2.1.54, Paul Thomas, 2004/02/18
- Re: Slowup in 2.1.54, John W. Eaton, 2004/02/18
- Re: Slowup in 2.1.54, Paul Thomas, 2004/02/18
- Re: Slowup in 2.1.54, John W. Eaton, 2004/02/18
- Re: Slowup in 2.1.54, David Bateman, 2004/02/18
- Re: Slowup in 2.1.54, Paul Kienzle, 2004/02/18
- Re: Slowup in 2.1.54, Daniel J Sebald, 2004/02/18
- Re: Slowup in 2.1.54, Paul Thomas, 2004/02/19