.

GroupFunctionRedisEdis (LevelDB)Edis (PD)Redis vs. LevelDB [13]Redis vs. PD [14]

.

KeysDELNNN119.78565064803913.7130456577063

.

EXISTS1116.218227421008282.86442572175194

.

EXPIRE11174.64303597411583.28024614851385

.

EXPIREAT11193.79789411419733.34925890377708

.

KEYSNNN21.70940509970293.07602624793204

.

MOVE1113.680722408372553.83420303263986

.

OBJECT1114.149690596218272.8823557183441

.

PERSIST11168.33394088162014.13844882235819

.

RANDOMKEY1

.

RENAME11191.83242072326563.60455440956613

.

RENAMENX11159.70497990866473.84762250709105

.

SORTN+M*log(M)N+M*log(M)N+M*log(M)3.964713551484553.62755678249825

.

TTL1113.873797665488043.00898962513785

.

TYPE1116.712843965834144.06264269462276

.

StringAPPEND1113.62509233002342.84150309965658

.

DECR1113.128208828260871.69366205221521

.

DECRBY1113.177809487711982.14225921841304

.

GET1112.399272074146851.78115324824979

.

GETBIT1113.426180751211811.88408144238066

.

GETRANGENN [1]N [1]3.399462651675092.30700020472116

.

GETSET1112.553334158185591.96951998773541

.

INCR1114.255191054575832.15399069290975

.

INCRBY1113.246202298351211.62302806421132

.

MGETNNN5.486143006168775.08736709487168

.

MSETNNN18.954867486612521.4959510885019

.

MSETNXNNN21.5557369853595

.

SET11 [2]1 [2]3.90009488588371.78641051776517

.

SETBIT1113.195726037166382.68127904115727

.

SETEX1113.782919305248781.34166749098898

.

SETNX1113.448037820935171.69198990286202

.

SETRANGE1114.914843735860212.49838834833726

.

STRLEN1114.995660662910392.69980894804213

.

HashesHDELNNN5.349684598498282.11032159023148

.

HEXISTS1115.728119538157821.90357711560331

.

HGET1113.820718718629352.34661849714831

.

HGETALLNNN2.503389747533053.16155519676815

.

HINCRBY1118.543996425073462.23216028596264

.

HKEYSNNN6.089544437149643.19127692862436

.

HLEN1116.02152046719912.40832038659977

.

HMGETNNN6.283168114171494.67358192923332

.

HMSETNNN17.255276133560511.222132019916

.

HSET1N17.786973945439762.38582610133498

.

HSETNX1N16.246014626813322.17301919509006

.

HVALSNNN3.043571006404253.02858598290411

.

ListsBLPOP1114.16165189907082.50467078472722

.

BRPOP1114.240878271487052.81962056761146

.

BRPOPLPUSH1113.485798789124812.22046166623774

.

LINDEXNNN4.668759978827922.50969673190228

.

LINSERTNNN6.46838729998642.59679926611131

.

LLEN1117.50488088684862.55159464342047

.

LPOP1116.792352285277882.62703683270743

.

LPUSH1115.151426830142783.07461674860769

.

LPUSHX1117.444226135737032.75065969952453

.

LRANGES+NS+NS+N4.205197245379273.79011055151896

.

LREMNNN4.603808619220051.70884206382671

.

LSETNNN5.241919216846442.74462098836147

.

LTRIMNNN3.644162224652030.41710360388436

.

RPOP11N7.185175658838672.60927339428827

.

RPOPLPUSH11N5.352116321673512.67912968535877

.

RPUSH11N5.010239900788792.77067832295673

.

RPUSHX11N5.199691631065452.51012345579005

.

SetsSADDNNN23.622709712504815.2448724514237

.

SCARD1112.799890857441061.73835570110413

.

SDIFFNNN2.817096098390793.13497780836578

.

SDIFFSTORENNN1.880287949768160.8858777317386

.

SINTERN*MN*MN*M3.038636487087313.034139216808

.

SINTERSTOREN*MN*MN*M1.599618227576931.1090965314815

.

SISMEMBER1N14.681733657744792.53429710475704

.

SMEMBERSNNN3.072659437376183.50642333141775

.

SMOVE1N17.523779246182392.76576401081206

.

SPOP1N15.532092753429792.22052384899651

.

SRANDMEMBER11 [3]1 [3]4.375144880881723.46660876058438

.

SREMNNN13.941993403653412.2097873751812

.

SUNIONNNN3.159942868045352.6748216474364

.

SUNIONSTORENNN1.928805661077820.75941023378798

.

ZSetsZADDlog(N)log(N) [4]log(N) [4]9.396627355149928.50237370678093

.

ZCARD1N113.01728554858711.04007758190911

.

ZCOUNTlog(N)+MN+MN+M95.241243715263634.7548466798674

.

ZINCRBYlog(N)Nlog(N)24.75000604055411.22459340230916

.

ZINTERSTOREN*K+[M*log(M)]NN*K+[M*log(M)] [5]NN*K+[M*log(M)] [5]37.2476285946993 [6]24.1441112108073 [7]

.

ZRANGElog(N)+MNN43.062969248892529.0842980941206

.

ZRANGEBYSCORElog(N)+MN+M [8]N+M [8]13.81967959889482.65558910083844

.

ZRANKlog(N)NN68.353488089435540.228855399896

.

ZREMlog(N)log(N) [9]log(N) [9]225.86796708778213.7872300298585

.

ZREMRANGEBYRANKlog(N)+MN+MN+M68.299124870155237.1061650282648

.

ZREMRANGEBYSCORElog(N)+MN+MN+M100.30695433384723.5390451555382

.

ZREVRANGElog(N)+MN+MN+M16.4015102810873.49771286775894

.

ZREVRANGEBYSCORElog(N)+MN+MN+M15.77901472566064.43778180392682

.

ZREVRANKlog(N)NN20.39373390695224.03747475499041

.

ZSCORE1log(N) [10]log(N) [10]7.52446717812271.12415374853058

.

ZUNIONSTOREN+[M*log(M)]N+[M*log(M)]N+[M*log(M)]12.3174020555287

.

TransactionsWATCH111

.

UNWATCH111

.

ServerCONFIG RESETSTAT11 [11]1 [11]

.

Pub/SubPSUBSCRIBENNN [12]

.

PUBLISHN+MN+MN+M

.

PUNSUBSCRIBEN+MNN

.

SUBSCRIBENNN

.

UNSUBSCRIBENNN

.

Average18.69051263980435.72236504790434
[1] It's in fact O(1) in the same sense that redis' one is O(1) - copying strings is cheap
[2] It's really O(n) but n is the length of the string and I still have to see how redis makes it O(1)... seems impossible to me since, at least, you have to send the string over the wire. Anyway... even when it's O(n), it's in fact ~O(4ms*n) so... it most likely doesn't matter
[3] It takes a random (always < N) amount of time. It's not as good as O(1) but it seems manageable
[4] Assuming you're adding way less elements than N
[5] NN is the size of the bigger one, not the smaller one
[6] K is the only one that makes the difference... N and M diffs are ~5... K makes it like 24 times slower
[7] N is below 1.0, but K and M bump the difference
[8] We're not taking advantage of LIMIT to run faster
[9] Assuming you're removing way less elements than N
[10] I don't believe Redis when they say O(1) anyway
[11] Not really implemented yet :P
[12] Lack of erldis support for this kind of operations prevents us from running these benchmarks
[13] Speed comparison between Edis on eleveldb and Redis, both running on one mac-mini with 2.4 GHz Intel Core 2 Duo and 4 GB RAM (Experiments run for values of N, M, etc. raging from 50 to 2050) - The values represent how many times is edis slower than redis
[14] Speed comparison between Edis on just memory and Redis, both running on one mac-mini with 2.4 GHz Intel Core 2 Duo and 4 GB RAM (Experiments run for values of N, M, etc. raging from 50 to 2050) - The values represent how many times is edis slower than redis