+2018-07-16 Nicolas Roche <roche@adacore.com>
+
+ * libgnat/a-strunb.adb, libgnat/a-strunb__shared.adb: Adjust growth
+ factor from 1/32 to 1/2 for Unbounded_String.
+
2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/lang.opt (funsigned-char): New option.
(Source : in out Unbounded_String;
Chunk_Size : Natural)
is
- Growth_Factor : constant := 32;
+ Growth_Factor : constant := 2;
-- The growth factor controls how much extra space is allocated when
-- we have to increase the size of an allocated unbounded string. By
-- allocating extra space, we avoid the need to reallocate on every
-- append, particularly important when a string is built up by repeated
-- append operations of small pieces. This is expressed as a factor so
- -- 32 means add 1/32 of the length of the string as growth space.
+ -- 2 means add 1/2 of the length of the string as growth space.
Min_Mul_Alloc : constant := Standard'Maximum_Alignment;
-- Allocation will be done by a multiple of Min_Mul_Alloc This causes
use Ada.Strings.Maps;
- Growth_Factor : constant := 32;
+ Growth_Factor : constant := 2;
-- The growth factor controls how much extra space is allocated when
-- we have to increase the size of an allocated unbounded string. By
-- allocating extra space, we avoid the need to reallocate on every
-- append, particularly important when a string is built up by repeated
-- append operations of small pieces. This is expressed as a factor so
- -- 32 means add 1/32 of the length of the string as growth space.
+ -- 2 means add 1/2 of the length of the string as growth space.
Min_Mul_Alloc : constant := Standard'Maximum_Alignment;
-- Allocation will be done by a multiple of Min_Mul_Alloc. This causes