[PolyORB-users] Memory management optimization in sequences
Maciej Sobczak
prog at msobczak.com
Mon May 19 12:02:05 CEST 2008
Hello,
I have noticed that unbound sequences have the following implementation:
type Sequence is new Ada.Finalization.Controlled with record
Length : Natural;
Content : Element_Array_Access;
end record;
This means that the single-element append operations have linear complexity.
Is it possible to change the implementation to something like:
type Sequence is new Ada.Finalization.Controlled with record
Length : Natural;
Used : Natural;
Content : Element_Array_Access;
end record;
which would allow amortized O(1) complexity for appends, for the price
of more memory consumption on average.
Regards,
--
Maciej Sobczak * www.msobczak.com * www.inspirel.com
More information about the PolyORB-users
mailing list