bitops.c/bitopCommand: skip short minlen for FAST PATH

This commit is contained in:
Sun He 2014-12-03 10:07:58 +08:00
parent 0ec7672a5d
commit c98d4f5675

View File

@ -360,7 +360,7 @@ void bitopCommand(redisClient *c) {
* can take a fast path that performs much better than the * can take a fast path that performs much better than the
* vanilla algorithm. */ * vanilla algorithm. */
j = 0; j = 0;
if (minlen && numkeys <= 16) { if (minlen >= sizeof(unsigned long)*4 && numkeys <= 16) {
unsigned long *lp[16]; unsigned long *lp[16];
unsigned long *lres = (unsigned long*) res; unsigned long *lres = (unsigned long*) res;