octave-maintainers
[Top][All Lists]
Advanced

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

Re: Symbolic pkg vpa trig speed


From: LachlanA
Subject: Re: Symbolic pkg vpa trig speed
Date: Wed, 6 Jul 2016 19:02:56 -0700 (PDT)

Colin Macdonald-2 wrote
> x = rand(10, 10);
> 
> % make vpa objects from x in 16, 32, 48 (of course these will not 
> magically have extra precision, its just for timing)
> xv16 = vpa(x, 16);
> xv32 = vpa(x, 32);
> xv48 = vpa(x, 48);
> 
> tic; sin(x); toc
> Elapsed time is 0.000461817 seconds.
> tic; sin(xv16); toc
> Elapsed time is 0.156639 seconds.
> tic; sin(xv32); toc
> Elapsed time is 0.118703 seconds.
> tic; sin(xv48); toc
> Elapsed time is 0.175145 seconds.
> 
> The xv16 = bit seems take longer than I expect...

If the xv16 case was the first time sin was called for a symbolic variable,
the time may include loading some code into memory, or other initialization. 
What happens if you do them in the reverse order?

Cheers,
Lachlan



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Symbolic-pkg-vpa-trig-speed-tp4678231p4678280.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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