[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Performance optimization (allocation inside a for loop)
From: |
Francesco Potorti` |
Subject: |
Re: Performance optimization (allocation inside a for loop) |
Date: |
Tue, 07 Apr 2009 15:48:47 +0200 |
>I gave the idea a second thought - maybe it has some merits. Sometimes
>you really want to use an array as a stack in Octave to avoid going
>through a loop twice, so Octave can try to optimize such usage.
Two thoughts only:
1) if stack operations are one target of this optimisation, then it
would better to have a hysteresis behaviour, that is, deallocate
one chunk only when the free space is 2*chunk big; more generally,
deallocate so that at least a whole unused chunk remains unused
2) 1kB for chunk size is very little today. I would have considered
one memory page size at least, but since marginal improvements are
smaller for big chunks, maybe the current choice is good. Only a
benchmark can tell, I suppose.
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: address@hidden
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/
- Re: Performance optimization (allocation inside a for loop), (continued)
- Re: Performance optimization (allocation inside a for loop), Francesco Potorti`, 2009/04/02
- Re: Performance optimization (allocation inside a for loop), r, 2009/04/02
- Re: Performance optimization (allocation inside a for loop), John W. Eaton, 2009/04/02
- Re: Performance optimization (allocation inside a for loop), r, 2009/04/02
- Re: Performance optimization (allocation inside a for loop), Jaroslav Hajek, 2009/04/04
- Re: Performance optimization (allocation inside a for loop), r, 2009/04/04
- Re: Performance optimization (allocation inside a for loop), Jaroslav Hajek, 2009/04/04
- Re: Performance optimization (allocation inside a for loop), Jaroslav Hajek, 2009/04/04
- Re: Performance optimization (allocation inside a for loop), Jaroslav Hajek, 2009/04/07
- Re: Performance optimization (allocation inside a for loop),
Francesco Potorti` <=
- Re: Performance optimization (allocation inside a for loop), Jaroslav Hajek, 2009/04/08
- Re: Performance optimization (allocation inside a for loop), Francesco Potorti`, 2009/04/08
- Re: Performance optimization (allocation inside a for loop), Jaroslav Hajek, 2009/04/03