[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Allocation



On Wednesday 2002-05-01 06:48, Igor Cabral Corrêa wrote:

> > It doesn't matter whether your variables are global, local or
> > dynamically allocated onto the heap - Linux will manage them for you
> > in *exactly* the same way.

> I'll be honest with you: I thought in this question about memory
> allocation when working on my first scientific initiation project, a
> Matlab-to-C GPL compiler. Maybe this tiny speed advantage you said can
> be interesting in the target code of my compiler. It's commom the
> manipulation of matrices of order > 1000. In a program with lots of
>  1.000.000 iterations loops, the
> minimal
> speed advantage can make a great diference at the end.

*Can* make. Maybe. But that's something you should only worry about when 
(1) your code is working correctly, (2) it's still too slow *and* (3) you 
profiled it and saw that this thing is the most time-consuming one.

> I think this mailing list isn't for this kind of questions, but if
> necessary, can I ask some questions about compiler tools here? Flex and
> yacc has many aplications in game scripting too.

Sure.

-- 
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)

(A)bort (R)etry (P)retend this never happened ...