[991] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: [COLD] Possible optimization idea..

daemon@ATHENA.MIT.EDU (Sat May 4 01:28:08 1996 )

From: coder@ibm.net
Date: Sat, 04 May 96 10:07:42 +0000
To: brandon@tombstone.sunrem.com, coldstuff@cold.org
Reply-To: coder@ibm.net

"Brandon Gillespie" <brandon@tombstone.sunrem.com>writes:

> I have noticed that there is a very common construct in ColdC, and I am 
> considering adding an optimization for this construct.  Basically, you 
> will often see a variable initialized to a base data type, then x 
> elements are added to the variable and the result is returned.  The 
> problem here is you can end up having quite a few reallocs leading to 
> fragmentation and other problems, if the increments are small enough and 
> the end result is very large.  

It strikes me that time could be more profitably spent on having Cold do its 
own heap management.  Its not difficult to do, the performance gain is system 
wide, and it fairly decently addresses this concern as well.

J C Lawrence
----------(*)                              Internet: coder@ibm.net
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...