tiny optimization in accumarray
author |
Jaroslav Hajek <highegg@gmail.com> |
date |
Mon, 13 Sep 2010 07:12:52 +0200 |
parents |
2cc9b08bfd39 |
children |
0d7624852beb |
files |
scripts/ChangeLog scripts/general/accumarray.m |
diffstat |
2 files changed, 5 insertions(+), 1 deletions(-)
[+]
|
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-13 Jaroslav Hajek <highegg@gmail.com>
+
+ * general/accumarray.m: Use @vec instead of @(x) x(:) for faster call.
+
2010-09-11 Jaroslav Hajek <highegg@gmail.com>
* pkg/get_forge_pkg.m: Allow underscores in pkg names.
--- a/scripts/general/accumarray.m
+++ b/scripts/general/accumarray.m
@@ -71,7 +71,7 @@
endif
if (iscell (subs))
- subs = cellfun (@(x) x(:), subs, "UniformOutput", false);
+ subs = cellfun (@vec, subs, "UniformOutput", false);
ndims = numel (subs);
if (ndims == 1)
subs = subs{1};