Re: Performance of element access in Vector
- From: george.priv@xxxxxxxxx
- Date: Thu, 22 Jan 2009 05:52:41 -0800 (PST)
On Jan 22, 5:01 am, Georg Bauhaus <rm.dash-bauh...@xxxxxxxxxxxxx>
wrote:
george.p...@xxxxxxxxx schrieb:
If you just try to get away from C++ paradigm you can find other ways
to address these issues with raw arrays. Think in functional
programming framework for a change.
I'm curious. Vector algorithms use the STL paradigm specifically,
rather than some C++ paradigm. The STL with its generic algorithms
has a Scheme history (and an Ada one). FP languages tend to start
from sequential access to data, using recursion on the tail of some
list as their model. The STL notions of ::iterator and
::reverse_iterator, in particular considering their const variants,
suggest the same, to me at least. So I have two questions:
1) How does straight forward STL iteration differ from
FP recursion on lists? (Only thing I can think of is
that non-pure languages can use destructive update
of array components, so to speak (tampering in some Ada sense).)
2) Can we rely on pure FPL style compilation techniques
(as if there were neither refs nor monads) to achieve
compact representation of lists/arrays in memory,
and little copying?
(I am assuming that memory use is an important criterion
when targetting small capacity hardware.)
The issue raised by Maciej was about reading arrays of a-priory
unknown size. That will be impossible with C/C++ arrays (not
vector<>). I was trying to say that the elements of FP may be helpful
and Ada allows to use elements of FP with native array operations.
Trying to apply these technique to everything will be impractical.
G.
.
- References:
- Performance of element access in Vector
- From: Maciej Sobczak
- Re: Performance of element access in Vector
- From: Randy Brukardt
- Re: Performance of element access in Vector
- From: Maciej Sobczak
- Re: Performance of element access in Vector
- From: Dmitry A. Kazakov
- Re: Performance of element access in Vector
- From: george . priv
- Re: Performance of element access in Vector
- From: Maciej Sobczak
- Re: Performance of element access in Vector
- From: george . priv
- Re: Performance of element access in Vector
- From: Georg Bauhaus
- Performance of element access in Vector
- Prev by Date: Re: Gnat bind : how to ?
- Next by Date: ANN: Ahven 1.4
- Previous by thread: Re: Performance of element access in Vector
- Next by thread: Re: Performance of element access in Vector
- Index(es):
Relevant Pages
|