help-octave
[Top][All Lists]
Advanced

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

Re: cellfun vs. parcellfun: speed


From: Martin Helm
Subject: Re: cellfun vs. parcellfun: speed
Date: Tue, 04 Sep 2012 13:29:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0

You create way to many jobs, it is not effective to create 100000 jobs
on a 4 core machine (or whatever you have):

tic ; parcellfun (4, @isempty, cell(1,100000)) ; toc
parcellfun: 100000/100000 jobs done
Elapsed time is 30.6851 seconds.


tic ; parcellfun (4, @isempty, cell(1,100000), "ChunksPerProc", 1) ; toc
parcellfun: 4/4 jobs done
Elapsed time is 0.0850289 seconds.

tic ; parcellfun (2, @isempty, cell(1,100000), "ChunksPerProc", 1) ; toc
parcellfun: 2/2 jobs done
Elapsed time is 0.0729971 seconds.

tic ; cellfun (@isempty, cell(1,100000)) ; toc
Elapsed time is 0.10386 seconds.

so you see even with that trivial example I get a little bit speedup
compared to cellfun, when limiting the number of jobs to something
reasonable (i3 notebook dual core with hyperthreading)



reply via email to

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