Fri, 14 Feb 2003 10:13:03 +0100
On 13/02, james hopper wrote:
| Both os x and linux. what i was doing was passing real time radar
| images from our sim code on the server to the display app on another
| computer. the difference was quite dramatic. i could get 60 hz with
| AdaSockets, but only about 10hz with gnat sockets. i was in a bit of
| a rush and never really went into what was causing the difference.
I made the following tests.
Send and Recv 10000 times a message of 2**15 bytes
Send and Recv 10000 times a message of 2**18 bytes
using AdaSockets (AS) and GNAT.Sockets (GS)
I got the following results.
as_recv 14.836 total
gs_recv 6.463 total
as_recv 1:07.14 total
gs_recv 34.968 total
I got quite different results from J. Hopper. GNAT.Sockets is twice
faster than AdaSockets. Probably because I used a binary version of
GNAT and a dynamic library for AdaSockets.
Anyway, I don't think the differences observed are due to the sockets
library, but most probably to differences in the implementation of the
It seems to me reading the code of the two implementations that there
is no significant difference of efficiency on the basic
routines. However, both libraries have their own specific features.
BTW, the buffered mode is only used in string-oriented routines like
Get_Line, Get_Char and Get (to avoid reading characters one by
one). It seems to me that the difference observed on images exchange
cannot come from this.