POV-Ray : Newsgroups : povray.off-topic : Speed comparison between C# and C++ : Re: Speed comparison between C# and C++ Server Time
2 Nov 2024 23:12:10 EDT (-0400)
  Re: Speed comparison between C# and C++  
From: Warp
Date: 17 Apr 2008 13:39:38
Message: <48078b5a@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.