Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: speeding up ACCUMARRAY
Date: Tue, 13 Nov 2012 18:27:16 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <k7u3e4$8ml$1@newscl01ah.mathworks.com>
References: <k7u1ju$1e7$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1352831236 8917 172.30.248.46 (13 Nov 2012 18:27:16 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 13 Nov 2012 18:27:16 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2264149
Xref: news.mathworks.com comp.soft-sys.matlab:782703

I must admit, I've always found accumarray to be remarkably fast, e.g.,

% DATA
subs = ceil(rand(1000000,1)*10);

% ENGINE
tic
for i = 1:1000
  accumarray(subs, 1);
end
toc

% Result = 1.40 seconds

Is there a specific usage you have in mind?