Re:Faster than C? Parsing binary data in JavaScript.
by vidarh on Monday October 08, 2012 @08:52AM
(#4626590)
Last time I looked at the MySQL client library, which is admittedly a few years ago, I was horrified to find it wasted a tremendous amount of time doing tiny read()'s instead of reading into larger buffers and splitting things up client side - the former causes ridiculous extra latency due to the extra context switches - , so I'd not be the least bit surprised if it is still slow.
In fact, if the tiny reads are still there in the MySQL C client, that in itself might explain the difference.
In fact, if the tiny reads are still there in the MySQL C client, that in itself might explain the difference.