performance hit with functions of vectors
augustm
augustmiles at yahoo.com
Fri Jan 4 05:38:55 CST 2008
Hello,
I am using a version of octave-3.0.0, compiled on a 64-bit linux machine using gcc.
(I am NOT using the experimental enable-64 options)
I am troubled by the variability of function evaluations speeds applied to vectors;
I have a vector of variables of length 30,000.
octave:1> whos zz
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd zz 30000x1 360008 double
Their range is quite reasonable- so there is no question of under/overflow
octave:2> min(zz)
ans = Compressed Column Sparse (rows = 1, cols = 1, nnz = 1)
(1, 1) -> 0.15938
octave:3> max(zz)
ans = Compressed Column Sparse (rows = 1, cols = 1, nnz = 1)
(1, 1) -> 170.70
I perform a simple function evaluation- it's fast
octave:4> tic; j=sin(zz); toc
Elapsed time is 0.0016 seconds.
However now the problem!
*********************************
octave:5> tic; j=cos(zz); toc
Elapsed time is 0.59 seconds.
**********************************
certain functions are 400 times slower than others.
Thus
tic; j=log(zz); toc
Elapsed time is 0.59 seconds.
but this is much better
tic; j=tan(zz); toc
Elapsed time is 0.002 seconds.
I am a bit lost how to go further. I can send full compilation details if needed.
Most extras were compiled in- SuiteSparse etc.
TM
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
More information about the Bug-octave
mailing list