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 radf...@cs.toronto.edu 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
... 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 allocations. If
On Wed, Feb 18, 2015 at 7:19 AM, Radford Neal radf...@cs.toronto.edu 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
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 anticipating: add a
I'm trying to improve the performance of the update loop within a
logistic regression, and am struggling against the overhead of memory
allocation and garbage collection. The main issue I'd like to solve
is with assignments inside of loops like this:
reweight = function(iter, w, Q) {
for (i