$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Ian McCulloch (ianmcc_at_[hidden])
Date: 2002-04-15 08:27:02
On 15 Apr 2002, David White wrote:
> I was wondering if there would be any interest in a class template,
> vlarray, which would have functionality similar to a stack-based array,
> but which would have its size set at runtime. Essentially it would
> provide functionality similar to the Variable Length Arrays (VLAs) now
> offered in C. It would have a specialized allocation strategy written
> for it, which would provide allocation/deallocation times much faster
> than more general containers such as straight heap-based arrays or
> vectors.
 ...
I for one would definitely be interested in this, there are several times 
I need a tempoary buffer in the inner loop of a high performance 
(well, its _supposed_ to be high performance :-) numerical code, 
currently this buffer has to be supplied by the caller, a fast stack-based 
allocator would be a nice alternative, especially since it would eliminate 
what is currently an assumed maximum size.
It is important that the container imposes as few restrictions as possible 
on the underlying value_type, and especially, that a stack-based 
container of builtins does not initialize the elements.  If this is 
not possible/desirable, then it would be better to separate the allocation 
into another class and layer the array on top.
Cheers,
Ian McCulloch