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:20:33 EDT (-0400)
  Re: Speed comparison between C# and C++  
From: Orchid XP v8
Date: 17 Apr 2008 14:29:53
Message: <48079721@news.povray.org>
Warp wrote:

>   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).

Maybe because allocating memory is a "rare" operation in C / C++ so 
there's not as much need to optimise it?

(Certainly in a language like Java, if you *don't* optimise the 
allocation of memory, the thing will crawl...)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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