>> There is a misunderstanding there: I'm using clear only to flush the >> state at the beginning of the computation. The Appender is a class >> field, used by the class methods to calculate. If I do not clear it at >> the beginning of the methods, I keep appending new results to old >> computations, which is not what I want. But really, calling clear is a >> minor point: I'm interested in Appender's effect on *one* (long, > > > This is exactly what I propose to change - set `length` to 0 instead of > calling `clear`. That way you will keep using same memory chunk simply > abandoning its old state at the beginning of each computation.
You mean by using the shrinkTo method? (Appender does not have a length, that's a bit of a bother btw). I just did, it does not change anything. Too bad. Heck, my code is simpler to read and use *and* faster by using a bog-standard D array. I'll keep my array for now :)