Re: Really easy optimization with std.experimental.allocator

2017-01-07 Thread Dicebot via Digitalmars-d-learn
On Sunday, 18 September 2016 at 01:44:10 UTC, Ryan wrote: I think it works because each time you call dispose it tells the GC to mark that memory as available, without the GC needing to do a collection sweep. This could be a really useful tip in the allocators section, as I see converting to IA

Really easy optimization with std.experimental.allocator

2016-09-17 Thread Ryan via Digitalmars-d-learn
I've been learning about allocators in D. Much easier than C++, and this little program shows a really easy optimization. Just use the IAllocator interface with the GC. --- import std.datetime; import std.experimental.allocator; imp