[std.database]
Piotr Szturmaj
bncrbme at jadamspam.pl
Mon Oct 17 08:55:57 PDT 2011
simendsjo wrote:
> On 17.10.2011 17:26, Piotr Szturmaj wrote:
>>
>> You probably meant me. If we create MySQL client without using C
>> bindings then we would have one of the fastest bindings at all. It may
>> attract some people who write web apps to D. The same applies to
>> PostgreSQL for which I wrote client without using a C binding.
>
> Why would a reimplementation be much faster? Is the C library "slow"? Or
> is there any overhead I'm not thinking of?
There is always a function call overhead and also most of the fields are
returned as strings, whereas in underlying protocol they are encoded
binary, i.e. int is not sent as its decimal string representation but as
4 bytes. This saves some time taken by string to int conversion (parsing).
More information about the Digitalmars-d
mailing list