Re: Re[6]: [fpc-devel] static vs dynamic arrays

2006-04-04 Thread Michael Van Canneyt
On Tue, 4 Apr 2006, Jonas Maebe wrote: On 4 apr 2006, at 15:01, Michael Van Canneyt wrote: Thank you, that was informative. Here are the results (one program at the end for completeness): ap^:=app^; inc(ap); dec(bp); 47804845 ap^:=1; inc(ap); 37033703

Re: Re[6]: [fpc-devel] static vs dynamic arrays

2006-04-04 Thread Jonas Maebe
On 4 apr 2006, at 16:28, Jonas Maebe wrote: No, that is not true. He's now using plain pointers. The compiler does not keep track of the fact that a particular pointer points to a reference-counted type. Both loops are now equally fast in principle (and they are in practice on e.g. ppc).

Re: Re[6]: [fpc-devel] static vs dynamic arrays

2006-04-04 Thread Jonas Maebe
On 4 apr 2006, at 15:01, Michael Van Canneyt wrote: Thank you, that was informative. Here are the results (one program at the end for completeness): ap^:=app^; inc(ap); dec(bp); 47804845 ap^:=1; inc(ap); 37033703 ap^:=a[0] xor ap^; inc(ap); 3813420

Re[6]: [fpc-devel] static vs dynamic arrays

2006-04-04 Thread Michael Van Canneyt
On Tue, 4 Apr 2006, ??? wrote: If you really want to speed up both cases you need to use pointers and increase the pointer value in each iteration. This saves the indexing in every iteration. Thank you, that was informative. Here are the results (one program at the end for comp

Re[6]: [fpc-devel] static vs dynamic arrays

2006-04-04 Thread Пётр Косаревский
> If you really want to speed up both cases you need to use pointers and > increase the pointer value in each iteration. This saves the indexing in > every iteration. Thank you, that was informative. Here are the results (one program at the end for completeness): ap^:=app^; inc(ap); d

Re: Re[6]: [fpc-devel] static vs dynamic arrays

2006-04-04 Thread Jonas Maebe
On 4 apr 2006, at 13:46, Пётр Косаревский wrote: No, it's a very common cases on all cpus which have a reasonable amount of available registers. With 3-4 dynamical arrays and several parameters? It all depends on how many parameters, how many other variables and how they are used. But a PP

Re: Re[6]: [fpc-devel] static vs dynamic arrays

2006-04-04 Thread Peter Vreman
>> No, it's a very common cases on all cpus which have a reasonable >> amount of available registers. > With 3-4 dynamical arrays and several parameters? > >> > What can I do to speed up dynamical arrays? >> > >> > What can I do to speed up static arrays? > I mean: what is the shortest way to estim

Re[6]: [fpc-devel] static vs dynamic arrays

2006-04-04 Thread Пётр Косаревский
> No, it's a very common cases on all cpus which have a reasonable > amount of available registers. With 3-4 dynamical arrays and several parameters? > > What can I do to speed up dynamical arrays? > > > > What can I do to speed up static arrays? I mean: what is the shortest way to estimate spee