Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-02

Sockets IO speed

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexander Todorov

Hello,
an old e-mail on the Lazarus mailing lists says:

topic: [lazarus] c faster than pascal? was: Compiling GlScene ...

On 6/12/06, Michael Van Canneyt wrote:
[ skip ]

By default FPC uses a 256 byte buffer for text IO; The C library uses a 4K buffer. Obviously, C's input/output will be faster by a large factor.

[ skip ]

Does FPC use such buffer when doing Sockets.Send/Sockets.Recv ? Where do I have to look if I want to optimize speed?

Thanks.
Alexander

Michael Van Canneyt
to Alexander Todorov
Alexander Todorov wrote 14 lines
Hello, an old e-mail on the Lazarus mailing lists says: topic: [lazarus] c faster than pascal? was: Compiling GlScene ... On 6/12/06, Michael Van Canneyt wrote: [ skip ] > By default FPC uses a 256 byte buffer for text IO; The C library uses a > 4K buffer. Obviously, C's input/output will be faster by a large factor. [ skip ] Does FPC use such buffer when doing Sockets.Send/Sockets.Recv ?

It depends on whether you use the Text file or if you use a simple socket descriptor. In the case of the Text file: yes it does. If you use a simple socket descriptor: no buffer is used.

Michael.