[julia-users] Manual Memory Pool w Contiguous Entries

2015-07-26 Thread andrew cooke
I have a stack of objects that changes size. It never gets very large, but it varies in size a lot. Much of my program's time is spent creating objects to push onto the stack and then GCing them when they are popped. This seems like an obvious place to do some kind of manual pooling of

Re: [julia-users] Manual Memory Pool w Contiguous Entries

2015-07-26 Thread Spencer Russell
If you have an array of immutables you can replace the elements with new ones: julia immutable Immut x::Int64 y::Float64 end julia a = Array(Immut, 5) 5-element Array{Immut,1}: Immut(140562692057328,6.9447197253385e-310) Immut(493921239054,6.94471970408933e-310)