Hi! After some benchmarking of different functions in MySQL, I noticed noticed that conversion of longlong to string is awfully slow on a Intel pentium. To help this, we thought we should have a little context about this: The person that can find or code the fastest possible longlong (64 bit) to string function on pentiumII will get one of our new MySQL T-shirts (in addition to a faster MySQL :) Note that we need a function (or functions) that can convert both signed and unsigned long long:s to strings. The function can be coded in C, C++ or assembler and the copyright of the code should be free or LGPL. It doesn't have to implement different base systems (as longlong2str). The main criteria is that it can be compiled on Intel-Linux. As most values are in MySQL are long or dates (as opposite to full long long values), the test program uses more small number values than big numbers to get the test a little 'weighted'. I have attached short test program that one can use as a base for this. The loop in this program will be used as a test for deciding with conversion function is best. I have looked at the glibc source for the itoa that the uses, but this isn't that good as there isn't a direct interface to this, beside sprintf, and the parsing in sprintf slows down things a lot. (I can't understand why there isn't a direct entry to itoa in glibc! I know that the developers will probably say that you should use sprintf() instead, but in this case why are there so many calls to itoa() in the glibc library itself?. Calling sprintf() when you don't need is just causes an unacceptable overhead in this case!) Regards, Monty ----------------------------------------------------------- Send a mail to [EMAIL PROTECTED] with unsubscribe mysql [EMAIL PROTECTED] in the body of the message to unsubscribe from this list.
