help-octave
[Top][All Lists]
Advanced

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

Re: indexing expression performance


From: Francesco Potortì
Subject: Re: indexing expression performance
Date: Thu, 15 Jan 2009 10:10:31 +0100

>You may also be interested in the most recent indexing improvements:
>http://hg.savannah.gnu.org/hgweb/octave/rev/ad3afaaa19c1
>http://www.nabble.com/lazy-contiguous-subrange-indexing-td21458811.html
>
>this will cheat your first loop to run in almost zero time...

This is very interesting.  In fact, I routinely extract (usually memory
contiguous) 2-d slices from a big multidim matrix to sum them, without
ever writing to the matrix.  To work around the slow indexing problem, I
resorted to the linear indexin trick, followed by resizing.  I think the
above improvements will significantly speed up my code, which is
important to me as I extract a big number of slices to make Montecarlo
computations.

Thanks again :)

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

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