Is object.reserve() only useful for large arrays, or should I always use it if I intend to append to an array?
Let's say I want to read some data, and I expect there to be ~100 bytes of data. Is there any point in using reserve() first, or will there always be that much memory available to an array? byte[] buffer; buffer.reserve(100); foreach(byte b; dataSource) buffer ~= b; -Lars