The Delete operations in the bounded ordered containers have been
substantially sped up. No change in semantics, so no test.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Bob Duff <d...@adacore.com>
gcc/ada/
* libgnat/a-cborma.adb, libgnat/a-cborse.adb (Clear): Repeatedly
call Delete. This avoids clearing the free list, which
substantially speeds up future Delete operations.
--- gcc/ada/libgnat/a-cborma.adb
+++ gcc/ada/libgnat/a-cborma.adb
@@ -374,7 +374,9 @@ package body Ada.Containers.Bounded_Ordered_Maps is
procedure Clear (Container : in out Map) is
begin
- Tree_Operations.Clear_Tree (Container);
+ while not Container.Is_Empty loop
+ Container.Delete_Last;
+ end loop;
end Clear;
-----------
--- gcc/ada/libgnat/a-cborse.adb
+++ gcc/ada/libgnat/a-cborse.adb
@@ -374,7 +374,9 @@ package body Ada.Containers.Bounded_Ordered_Sets is
procedure Clear (Container : in out Set) is
begin
- Tree_Operations.Clear_Tree (Container);
+ while not Container.Is_Empty loop
+ Container.Delete_Last;
+ end loop;
end Clear;
-----------