MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Memory operations


Hi,
Since the following is all I know of your program
________________
ar={};
For[i=0,++i<10000000000,
ar=Append[ar,{bla bla bla}];
]
_____________________
I cannot recommend more. The fact that you do not know in advance how many
elements are in the list is irrelevant.  Functional programming, as well as
pattern matching programming  are not effected. you can operate on the
entire list at once, and leave Mathematica to take care of how to operate on
each individual element.

As I said, I find it difficult to elaborate more due to lack of sufficient
details
regards
yehuda


On 3/13/06, sir_puding at tut.by <sir_puding at tut.by> wrote:
>
> > I vote for changing the way you work.
> > From my experience, For is the slowest loop in Mathematica.
> > Add it to the way that mathematica manage memory with apend, and I think
> you
> > will find it hard to make a less efficient program.
> > regards
> > yehuda
>
> So, i think you can suggest best how to organize FIFO (or LIFO) query  in
> Mathematica(TM).
>
> Problem is that i do not know how many results from operations I'll
> get (for example multiple root finding).
>
>
> TNX.
> Sergey
>
>



  • Prev by Date: Factoring
  • Next by Date: Re: ShadowPlot3D
  • Previous by thread: Re: Re: Re: Memory operations
  • Next by thread: Re: Memory operations