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:16:01 EDT (-0400)
  Re: Speed comparison between C# and C++  
From: Nicolas Alvarez
Date: 17 Apr 2008 20:52:02
Message: <4807f0b2$1@news.povray.org>

> Warp wrote:
>> reason memory allocation speed is not something which has been optimized
>> to death in C(++) compilers, for whatever reasons 
> 
> I'm suspecting it's because C and C++ use pointers rather than 
> references, and can't carry around enough metadata (generally speaking) 
> to allow finding the pointers in a data structure, so they can't compact 
> memory. That means that finding free memory is generally a search.

Well, you can't move objects around in memory to compact, that is true. 
However, nothing stops a memory allocator from keeping lots of metadata 
internally to find free memory quickly.

How do filesystems know what empty blocks are available to save a new 
file? A linear search from the beginning of the disk?


Post a reply to this message

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