help-octave
[Top][All Lists]
Advanced

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

Re: speeding up function


From: c.
Subject: Re: speeding up function
Date: Mon, 12 Jul 2010 20:32:11 +0200


On 12 Jul 2010, at 12:42, Jaroslav Hajek wrote:
hardly, obviously.

still, as I need the function to be matlab-compatible this info is relevant to me

but
according to matlab's profiler, in the call

aa = randn (4, 4, 100, 100, 25); res = matarrayfun (@inv , aa, [1, 2]);

most of the time is consumed by 'num2cell'...

c.


If you don't work with the development version, my first advice is to
upgrade.

I'd love to, unfortunately it's a few months (early march IIRC) since building tip on my system (OS X 10.5) last worked. I pull, update and retry to build regularly (about every 2 weeks) but I consistently get the same problem:

after the octave binary is built and linked and the build system proceed to producing the docs, as soon as octave is run
it crashes with a "segmentation-fault"

I tried to debug this using gdb/valgrind but got no useful hints.
I think a similar problem was recently reported on the list from someone building on redhat, in that case someone suggested a problem with atlas/blas/lapack, but I'm not sure there is any connection to my case.

Then, I'd suggest you take a representative case and try to
measure the actual time consumed by various parts using tic/toc or
cputime.

If you beleive there is any hope to improve matarrayfun,
I'll look into this next week and report back.

Your case for cell2mat seems rather special to me; perhaps it would be
better handled by using cat() directly.

I couldn't find a way to this without for cycles, is there something obvious I am missing?

c.




reply via email to

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