redict/tests
antirez d866803818 BITOP command 10x speed improvement.
This commit adds a fast-path to the BITOP that can be used for all the
bytes from 0 to the minimal length of the string, and if there are
at max 16 input keys.

Often the intersected bitmaps are roughly the same size, so this
optimization can provide a 10x speed boost to most real world usages
of the command.

Bytes are processed four full words at a time, in loops specialized
for the specific BITOP sub-command, without the need to check for
length issues with the inputs (since we run this algorithm only as far
as there is data from all the keys at the same time).

The remaining part of the string is intersected in the usual way using
the slow but generic algorith.

It is possible to do better than this with inputs that are not roughly
the same size, sorting the input keys by length, by initializing the
result string in a smarter way, and noticing that the final part of the
output string composed of only data from the longest string does not
need any proecessing since AND, OR and XOR against an empty string does
not alter the output (zero in the first case, and the original string in
the other two cases).

More implementations will be implemented later likely, but this should
be enough to release Redis 2.6-RC4 with bitops merged in.

Note: this commit also adds better testing for BITOP NOT command, that
is currently the faster and hard to optimize further since it just
flips the bits of a single input string.
2012-05-24 15:20:20 +02:00
..
assets fix typos in tests/assets/default.conf 2012-03-29 18:23:04 +08:00
helpers Regression test for issue 417 (memory leak when replicating to DB with id >= 10) 2012-03-30 10:26:07 +02:00
integration Properly wait the slave to sync with master in BRPOPLPUSH test. 2012-04-30 10:55:03 +02:00
support Redis test: include bug report on crash. 2012-05-22 13:13:24 +02:00
tmp minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00
unit BITOP command 10x speed improvement. 2012-05-24 15:20:20 +02:00
test_helper.tcl BITOP and BITCOUNT tests. 2012-05-24 15:19:48 +02:00