Deutsch   English   Français   Italiano  
<vmgh6q$uabo$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups: comp.lang.ada
Subject: ANN: Simple Components 4.70
Date: Sat, 18 Jan 2025 16:26:19 +0100
Organization: A noiseless patient Spider
Lines: 82
Message-ID: <vmgh6q$uabo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 18 Jan 2025 16:26:18 +0100 (CET)
Injection-Info: dont-email.me; posting-host="e25519e0b4f67647b13f6642e40b6540";
	logging-data="993656"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+0aRPRXLJB8LESMWXeGpy0KNkvBlyiW4Y="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Ls76mSR1Avt2VgOKClWUnqas+AE=
Content-Language: en-US
Bytes: 4557

The current version provides implementations of smart pointers, directed 
graphs, sets, maps, B-trees, stacks, tables, string editing, unbounded 
arrays, expression analyzers, lock-free data structures, synchronization 
primitives (events, race condition free pulse events, arrays of events, 
reentrant mutexes, deadlock-free arrays of mutexes), arbitrary precision 
arithmetic, pseudo-random non-repeating numbers, symmetric encoding and 
decoding, IEEE 754 representations support, streams, persistent storage, 
multiple connections server/client designing tools and protocols 
implementations.

https://www.dmitry-kazakov.de/ada/components.htm

Changes to the previous version:

- The package Unbounded_Unsigneds implementing arbitrary precision 
unsigned arithmetic was added;
- The package Unbounded_Integers implementing arbitrary precision 
integer arithmetic was added;
- The package Unbounded_Unsigneds Primes implementing operations with 
prime numbers was added;
- The package Unbounded_Unsigneds.Montgomery implementing Montgomery 
domain operations was added;
- The package Unbounded_Unsigneds.Barrett implementing Barrett reduction 
was added;
- The package Strings_Edit.Unbounded_Unsigned_Edit string editing for 
arbitrary precision unsigned numbers was added;
- The package Strings_Edit.Unbounded_Integer_Edit string editing for 
arbitrary precision integer numbers was added;
- The package Unbounded_Unsigneds.Parallel implementing parallel 
arbitrary precision algorithms was added;
- The package Job_Servers was added implementing servers of jobs backed 
by a task pool;
- The number protocol added to Python bindings;
- Reply_Text and Reply_HTML in 
GNAT.Sockets.Connection_State_Machine.HTTP_Server modified to call 
Send_Body passing the Get parameter rather than skipping it when Get = 
False;
- UUID v6 and v7 generation was added to Universally_Unique_Identifiers.

The key points of the arbitrary precision arithmetic packages design and 
functionality:

- Advanced memory management preventing excessive copying;
- The number internal representation vector is shared between objects if 
possible;
- No limit on the number size, except for the storage pool size;
- In-place versions of operations (e.g. for addition, subtraction) 
further reduce need of copying;
- Lazy memory deallocation strategy, the memory is kept between variable 
updates;
- Swapping variables;
- Long to short operations;
- Squaring;
- Square root, square root with remainder;
- Multiplicative inverse;
- 2's complement;
- Bit representation access, slicing, truncation;
- Full division with remainder, remainder only division;
- Karatsuba multiplication and squaring;
- Specialized operations involving powers of two and words;
- Exponentiation under modulo;
- Fibonacci number under modulo;
- Montgomery domain multiplication, squaring, exponentiation under 
modulo and primality tests of the domain modulus;
- Barrett reduction, multiplication, exponentiation;
- Primality tests: Miller-Rabin, Fibonacci, Lucas-Lehmer, strong Lucas;
- Parallel algorithms for very large numbers;
- String editing and formatting packages for the numbers.

Performance notes. In order to get optimal performance -O2 switch need 
to be used. It does 3x performance boost. 64-bit (with 128-bit integer) 
outperform 32-bit by many multiplies. See GPR variables: 
https://www.dmitry-kazakov.de/ada/components.htm#19 E.g.

gprbuild -P components-tests.gpr -XTarget_OS=Linux -Xarch=aarch64 
-XDevelopment=Release

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de