octave-maintainers
[Top][All Lists]
Advanced

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

Reducing memory usage in perms: fix attached


From: Arun Giridhar
Subject: Reducing memory usage in perms: fix attached
Date: Mon, 14 Jan 2013 15:29:04 -0500

All,

I noticed that calling perms(uint8(1:11)) on a system with 4GB memory thrashed the virtual memory even though the input was only type 8-bit integer. I found that perms was using the default type double in a couple of places internally. I have attached a context diff showing two small changes I made to octave/scripts/specfun/perms.m, which reduce memory usage substantially. In particular, perms(uint8(1:11)) now returns without thrashing virtual memory. Hope this helps.

Best,
Arun

Attachment: perm.diff
Description: Binary data


reply via email to

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