POV-Ray : Newsgroups : povray.off-topic : Speed comparison between C# and C++ : Re: Speed comparison between C# and C++ Server Time
1 Oct 2024 13:17:31 EDT (-0400)
  Re: Speed comparison between C# and C++  
From: Warp
Date: 17 Apr 2008 13:46:42
Message: <48078d02@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
> > And in a well-tuned GC system, that's less of a problem, see? :-)

> Somebody uses a C++ feature inefficiently, and that proves GC is better??

  In many (or most) GC'd languages (such as Java) memory allocation
(iow. 'new') is demonstrably faster than in most C++ implementations.
This is not a problem in C++ or an advantage of GC in particular, but
a question of how the allocator used by the compiler works. For some
reason memory allocation speed is not something which has been optimized
to death in C(++) compilers, for whatever reasons (even though most other
things have been). It's not a problem with the language itself, but a
problem with compilers (or, to be more precise, their libraries).

  For some reason Darren wants to think that the faster speed of memory
allocation in most GC'd languages is *because* of GC in particular (as if
those speeds were not possible in non-GC'd languages). This is demonstrably
not true. There's nothing in GC in particular which would make allocation
faster. It's just that GC engines have been more optimized for allocation
than most C(++) memory allocators.

  I have to admit this is a shame to C and C++. OTOH, it cannot be blamed
on the languages, but on the compilers and their libraries.

-- 
                                                          - Warp


Post a reply to this message

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