From: adacrypt on


I don’t profess to be very knowledgeable on the finer points of Ada’s
advantages so I will ask my question of more informed people and
hopefully get some guidance from some person.

In the cryptography that I have invented my encryption program and
corresponding decryption program both work in much the same way so its
only necessary to describe one in order to ask my question.

The encryption program (this will do) reads in a character from an
external batch file and encrypts it in between reading the next
character in the next pass of the same loop. The program is comprised
of a pair of nested loops. The inner loop is terminated by
end_of_line and the outer loop is terminated by end_of_file. The
encryption speed on an elderly home computer is 15000 characters per
second which is ok for this development model but not great for a
serious working cipher. I want to speed it up.

Question: If the encryption work was done in a separate CPU in another
location immediately after the character is read in would this speed
up the process very much. Is this proposition feasible i.e a loop
that reads in characters only for encryption in a separate CPU
elsewhere. Is this an example of concurrency in programming? Is it
to be recommended as the best solution to increasing the encryption
rate of my ciphers.

Your help in answering these questions would be greatly appreciated -
adacrypt


From: Warren on
adacrypt expounded in news:ab879ba9-12fb-4329-977e-248b7e856131
@u26g2000yqu.googlegroups.com:

> I don�t profess to be very knowledgeable on the finer points of Ada�s
> advantages so I will ask my question of more informed people and
> hopefully get some guidance from some person.
>
> In the cryptography that I have invented my encryption program and
> corresponding decryption program both work in much the same way so its
> only necessary to describe one in order to ask my question.
>
> The encryption program (this will do) reads in a character from an
> external batch file and encrypts it in between reading the next
> character in the next pass of the same loop. ...

> Question: If the encryption work was done in a separate CPU in another
> location immediately after the character is read in would this speed
> up the process very much.

Google or read about Ada "tasks" (or "tasking"). There you will
find out about the Ada support for concurrency ("threads").

Warren