If you link to tcmalloc instead of the default malloc on your system, the
performance of large allocations should improve. On unix machines you
don't even need to recompile -- you can do this with LD_PRELOAD. The
downside is that you'll almost certainly end up with higher average memory
usage.as
On Wed, 18 Feb 2015, Nathan Kurz wrote:
On Wed, Feb 18, 2015 at 7:19 AM, Radford Neal wrote:
... with assignments inside of loops like this:
reweight = function(iter, w, Q) {
for (i in 1:iter) {
wT = w * Q
}
}
... before the RHS is executed, the LHS allocation would be added
to a smal
Radford Neal:
> > there's a danger of getting carried away and essentially rewriting
> > malloc. To avoid this, one might try just calling "free" on the
> > no-longer-needed object, letting "malloc" then figure out when it can
> > be re-used.
Nathan Kurz:
> Yes, I think that's what I was anticipa
On Wed, Feb 18, 2015 at 7:19 AM, Radford Neal wrote:
>> ... with assignments inside of loops like this:
>>
>> reweight = function(iter, w, Q) {
>> for (i in 1:iter) {
>> wT = w * Q
>> }
>> }
>> ... before the RHS is executed, the LHS allocation would be added
>> to a small fixed length lis
> ... with assignments inside of loops like this:
>
> reweight = function(iter, w, Q) {
> for (i in 1:iter) {
> wT = w * Q
> }
> }
> ... before the RHS is executed, the LHS allocation would be added
> to a small fixed length list of available space which is checked
> before future allocati