# HG changeset patch # User Arun Giridha # Date 1376110385 25200 # Node ID 9336d0e1d1ec872fb4aa7148e81f1748923f62ab # Parent 87ba70043bfcd21acc5ba7ef5a318db6a74274ab perms.m: Use uint8 to reduce memory usage by 1/8th. * doc/interpreter/contributors.in: Add Arun Giridha to contributors list. * scripts/specfun/perms.m: Use uint8 to reduce memory usage by 1/8th. diff --git a/doc/interpreter/contributors.in b/doc/interpreter/contributors.in --- a/doc/interpreter/contributors.in +++ b/doc/interpreter/contributors.in @@ -75,6 +75,7 @@ Klaus Gebhardt Driss Ghaddab Nicolo Giorgetti +Arun Giridha Michael D. Godfrey Michael Goffioul Glenn Golden diff --git a/scripts/specfun/perms.m b/scripts/specfun/perms.m --- a/scripts/specfun/perms.m +++ b/scripts/specfun/perms.m @@ -42,7 +42,7 @@ if (nargin != 1) print_usage (); endif - vidx = [1:length(v)]'; + vidx = uint8 ([1:length(v)]'); n = length (vidx); if (n == 0) @@ -51,7 +51,7 @@ p = vidx(1); for j = 2:n B = p; - p = zeros (prod (2:j), n); + p = zeros (prod (2:j), n, "uint8"); k = rows (B); idx = 1:k; for i = j:-1:1