[PATCH] speed up tokenize_command

Paolo Borelli paolo.borelli at gmail.com
Thu Apr 12 23:57:02 UTC 2007


Hi, thanks for integrating the previous patches so fast!

It made me want to stare a bit at the code to look for any other little
improvements to make. I stumbled on tokenize_command() and for fun I
tried to write a faster version (no idea if it is a real bottleneck).

Attached there is my version and the small bench I used: on my machine
the function is about 20% faster. The nice thing is that the function is
even shorter and cleaner :)

I tested it a bit to see if my function handled all the cases in the
same way as the old one and it seems ok, but keep in mind that it has
not been tested in production...


ciao
	Paolo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tokenize.patch
Type: text/x-patch
Size: 2153 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/memcached/attachments/20070413/6b8374b7/tokenize.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: benchtokenize.c
Type: text/x-csrc
Size: 2852 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/memcached/attachments/20070413/6b8374b7/benchtokenize.c


More information about the memcached mailing list