|
|
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> > It's certainly not a good idea to create, resize and destroy 6 vectors
> > at each iteration.
> And in a well-tuned GC system, that's less of a problem, see? :-)
You and your obsession. It has nothing to do with GC. I has to do with
memory allocation strategies and optimization. There's nothing inherently
inefficient in non-GC'd allocation nor anything inherently efficient in
GC'd allocation. We are talking about *allocation* here, not deallocation.
There's basically no difference between GC'd and non-GC'd allocation.
A non-GC'd regular C++ allocator can be made extremely fast (there are
many practical demonstrations of this). For some reason, however, most
compilers prefer the space-optimal allocation scheme to the speed-optimal
one.
--
- Warp
Post a reply to this message
|
|