|
From: | Daniel Arteaga |
Subject: | Re: parcellfun (or cellfun) overhead |
Date: | Tue, 01 Feb 2011 12:52:26 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; ca-ES; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
Al 01/02/11 12:36, En/na Francesco Potortì ha escrit:
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.
It looks like that it may be helpful in this case.I am using an ond version of the "General" package (general-1.1.3, the one that comes with my ubuntu by default), and parcellfun didn't have this option. I'll update to the new version, try this option and report.
Thank you very much, D.
[Prev in Thread] | Current Thread | [Next in Thread] |