Newsgroups: comp.ai.genetic
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!news.alpha.net!uwm.edu!newsspool.doit.wisc.edu!night.primate.wisc.edu!relay!relay2!relay-wo!dtix.dt.navy.mil!navair2.nalda.navy.mil!avalon.chinalake.navy.mil!c2944j.chinalake.navy.mil!keyes
From: Chip Keyes <keyes@archimedes.chinalake.navy.mil>
Subject: GP Systems & CPU Time
Message-ID: <D6H7Mp.940@avalon.chinalake.navy.mil>
X-Xxmessage-Id: <ABA5A83908030E1C@c2944j.chinalake.navy.mil>
X-Xxdate: Mon, 3 Apr 95 13:27:21 GMT
Sender: usenet@avalon.chinalake.navy.mil (NAWS news admin)
Organization: Naval Air Warfare Center
X-Useragent: Version 1.1.3
Date: Mon, 3 Apr 1995 20:30:25 GMT
Lines: 21


It is widely assumed that the majority of time spent during
execution is in the evaluation of the fitness function for
each individual. In the C++ implementation I am working
with, this is not the case (yet).  After profiling my code,
I found that nearly 50% of the cpu time was being eaten
up during memory allocation from the heap. In my implementation,
nodes within the tree structure are dynamically allocated, in
the development of my program (tree ) objects.  The new  
function (which calls malloc) and involves heap management is
really time consuming.  A smart "arena"  allocation method
will provide (I suspect) a large improvement in execution time of
a system which currently runs ok by the standards others
are reporting.  

Is dynamic memory allocation prevalent in other C/C++
implementations?  If so, what % of time is being used in
heap allocation/management?

Thanks,
Chip
