help-octave
[Top][All Lists]
Advanced

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

Re: parcellfun (or cellfun) overhead


From: Francesco Potortì
Subject: Re: parcellfun (or cellfun) overhead
Date: Tue, 01 Feb 2011 12:36:59 +0100

>anonyFunc = @(x) func(x, paramStruct);
>splB = parcellfun(nThreads, anonyFunc, dataCell);
>
>where "paramStruct" is a very large structure array (70000 elements), 
>and "dataCell" contains each one of the imput data.
>
>The function "func" takes takes around 50 ms, (measured with tic-toc), 
>but when calling it with parcellfun it takes much longer, around 500 ms.
>
>Same happens when replacing parcellfun with cellfun.
>
>I suspect that this is due to the large size of paramStruct, because 
>this does not happen when replacing "func" by a dummy function.
>
>Any ideas of how could improve the situation?

Have you considered using the ChunksPerProc option?  It is described in
parcellfun's help.

-- 
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]