CVS difference for ai12s/ai12-0111-1.txt

Differences between 1.9 and version 1.10
Log of other versions for file ai12s/ai12-0111-1.txt

--- ai12s/ai12-0111-1.txt	2016/08/19 03:02:36	1.9
+++ ai12s/ai12-0111-1.txt	2016/10/03 03:57:28	1.10
@@ -2547,3 +2547,60 @@
 serve.
 
 ***************************************************************
+
+From: Jeff Cousins
+Sent: Wednesday, August 17, 2016  8:01 AM
+
+Ok, thanks Erhard.
+
+***************************************************************
+
+From: Erhard Ploedereder
+Sent: Saturday, August 20, 2016  7:31 PM
+
+
+I did ask my assistant to look at the problem again.
+
+First, I barked up the wrong tree in my cited message. Apologies. The slowness
+comes from inserting entities into hashed sets after reading them from external
+files. So it is the writing to hashed sets that is slow. Simply invert the
+quoted statements below wrt reading/writing.
+
+The time for reading/writing these files inclusive of storing/retrieving the
+entities from containers was measured. These measurements were compared among
+multiple languages using their respective container packages. Hence my
+inverted statement about reading/writing. Times for reading the files were
+really bad for Ada in comparison to the others. Culprit was/is the writing to
+the container.
+
+The slow writing to hashed sets is done by Ada.Containers.Hashed_Sets
+   procedure Include (Container : in out Set; New_Item : Element_Type);
+
+The comparably much faster reading is done by cursor over the hash set while
+writing the retrieved entities to a file.
+
+These possible causes were suspected (but not verified as the true causes):
+ - unnecessary additional allocations
+ - seemingly irrelevant computations (maybe tampering checks?)
+ - generality to deal with Element_Type of size not known at
+   compile time
+ - exception handling preventing inlining of calls
+
+***************************************************************
+
+From: Jeff Cousins
+Sent: Sunday, August 21, 2016  1:49 AM
+
+Thanks for looking that up Erhard. Good to get the info.
+
+***************************************************************
+
+From: Tucker Taft
+Sent: Sunday, August 21, 2016  12:19 PM
+
+For what it is worth, AdaCore has re-implemented most of the containers, and
+has added the ability to suppress either just tampering checks, or all checks,
+on container operations. Might be worth trying with the latest GNAT container
+implementations.
+
+***************************************************************

Questions? Ask the ACAA Technical Agent