Re: Re: Memory operations
- To: mathgroup at smc.vnet.net
- Subject: [mg65092] Re: [mg64988] Re: [mg64895] Memory operations
- From: bsyehuda at gmail.com
- Date: Tue, 14 Mar 2006 06:00:11 -0500 (EST)
- References: <200603071111.GAA08475@smc.vnet.net> <200603101015.FAA22032@smc.vnet.net> <75886088.20060313094717@tut.by>
- Sender: owner-wri-mathgroup at wolfram.com
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 > >
- References:
- Memory operations
- From: sir_puding@tut.by
- Re: Memory operations
- From: yehuda <bsyehuda@gmail.com>
- Memory operations