Comparison of three algorithms for summing an array of integers
This article shares a comparison of the time taken to sum an array of integers. This article tests three algorithms for summing the array. • A sequential summation using a single Ada task. • A concurrent summation using 16 Ada tasks coordinating using the Ada Rendezvous mechanism. • A concurrent summation using 16 Ada tasks coordinating using a shared buffer. This test personal computer has the following characteristics. • Processor : AMD Ryzen 7 7800X3D 8-Core Processor with baseline speed of 4.20 Ghz • RAM: 64.0 GB (63.2 GB usable) of DDR5 RAM • Operating System: Windows 11 Home The software for this test is written in the Ada programming language using the GNAT Community Edition 2021 compiler. The program source code is contained in three files. There is one custom Ada package defined for this test. The package is named array_sums. Ada packages separate the interface definition from the implementation. The interface definition, or package specification, as it is cal...