redict/tests/unit
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
..
type Fixed issue #516 (ZINTERSTORE mixing sets and zsets). 2012-05-23 11:12:43 +02:00
aofrw.tcl Test "Turning off AOF kills the background writing child if any" is now more reliable. 2012-05-02 11:40:46 +02:00
auth.tcl Fix for issue #132. Now AUTH raises an error if no server password is configured. 2011-10-10 22:21:17 +02:00
basic.tcl more valgrind (and other archs) friendly testing of floating number related features. 2011-11-16 14:40:50 +01:00
bitops.tcl BITOP command 10x speed improvement. 2012-05-24 15:20:20 +02:00
cas.tcl SORT with STORE removes key if result is empty. This fixes issue #227. 2012-01-30 07:36:49 +01:00
dump.tcl More MIGRATE tests. 2012-04-03 15:10:51 +02:00
expire.tcl Show problem with 'keys' command with specific command sequence. 2012-05-01 10:51:59 +02:00
introspection.tcl Tests for MONITOR. 2012-04-07 11:26:24 +02:00
limits.tcl More robust maxclients test. 2012-04-18 11:34:18 +02:00
maxmemory.tcl Maxmemory test 2011-07-28 12:32:52 +02:00
obuf-limits.tcl even less false positive on obuf-limits test. 2012-02-22 11:25:30 +01:00
other.tcl false positive in expire tests mitigated with a sleep, but other solutions exist if needed later. 2012-01-26 16:45:08 +01:00
printver.tcl Print version info before running the test 2011-05-20 11:44:54 +02:00
protocol.tcl New time limit for protocol desync test set to 30 seconds to reduce false positives. 2012-04-23 10:57:43 +02:00
pubsub.tcl more pub/sub tests 2010-06-16 11:03:23 +02:00
quit.tcl Add tests for OK on QUIT 2010-10-15 12:54:53 +02:00
scripting.tcl Redis test: scripting EVALSHA replication test more reliable. 2012-04-26 11:16:52 +02:00
slowlog.tcl Limit memory used by big SLOWLOG entries. 2012-04-21 20:34:45 +02:00
sort.tcl Added test for SORT corner case: pattern ending with just "->". 2012-04-17 16:28:59 +02:00