Hi Chaoran,

Thanks for asking this. I haven't had very much time to optimize the code
yet, but I thought I should go ahead and run a benchmark anyway just to
know what neighborhood I'm in.

I copied and pasted the benchmark that node_redis uses into then-redis and
made a few tweaks to make it work with then-redis. You can see the results
in the benchmarks
branch<https://github.com/mjijackson/then-redis/tree/benchmarks>up on
GitHub. FWIW, I ran the benchmarks on my MacBook Air 1.7 GHz running
node 0.10.0 and Redis 2.9.7.

The mean difference in ops/sec between then-redis and node_redis right now
is ~5,000. There are quite a few benchmarks where then-redis seems to be
faster, especially when the pipeline is small. It seems I have some room
for improvement when there are lots of commands in the pipeline.

Overall though I think the results are pretty encouraging. As with most
benchmarks, take them with a grain of salt. These things are hard to get
down to a science. :)

--
Michael Jackson
@mjackson


On Wed, Mar 13, 2013 at 11:50 AM, Chaoran Yang <[email protected]>wrote:

> It would be good if you can show some performance results, comparing with
> node_redis. What is the overhead like using promises?
>
> -Chaoran
>
>
> On Thursday, March 7, 2013 11:16:29 AM UTC-6, Michael Jackson wrote:
>
>> :D Thanks David.
>>
>> I've been programming almost exclusively in promises these past few
>> months and it feels pretty good. Plus, I'm a big believer in tiny modules
>> and simple code bases. Helps me grok them a bit easier when they're small.
>>
>> Also, thanks for your work on node_redis!
>>
>>
>> --
>> Michael Jackson
>> @mjackson
>>
>>
>> On Wed, Mar 6, 2013 at 8:54 PM, DTrejo <[email protected]> wrote:
>>
>>> Redis is 300 LOC!? ;)
>>>
>>> Cheers and good to have some competition to make us node_redis
>>> maintainers get into gear.
>>> D
>>>
>>> On Wednesday, March 6, 2013 1:23:25 PM UTC-5, Michael Jackson wrote:
>>>>
>>>> Hello,
>>>>
>>>> then-redis is a small, promise-based Redis client for node.js that I've
>>>> been working on over the past few weeks.  It supports all the features of
>>>> Redis in a simple, user-friendly package. I thought others might enjoy
>>>> using it as well, so I released the source this morning.
>>>>
>>>> https://github.com/mjijackson/****then-redis<https://github.com/mjijackson/then-redis>
>>>>
>>>> The two major differences between then-redis and node_redis are:
>>>>
>>>> 1. then-redis returns a promise when you issue a command
>>>> 2. The entire codebase is very small (~300 LOC), just like Redis
>>>>
>>>> Other than that the APIs are very similar. If you're using Redis and
>>>> you enjoy promise-style programming please check it out and let me know
>>>> what you think.
>>>>
>>>> Install it: npm install then-redis
>>>>
>>>> Enjoy!
>>>>
>>>> --
>>>> Michael Jackson
>>>> @mjackson
>>>>
>>>  --
>>> --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-*
>>> *Posting-Guidelines<https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines>
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>>
>>> To unsubscribe from this group, send email to
>>> nodejs+un...@**googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/nodejs?hl=en?hl=en<http://groups.google.com/group/nodejs?hl=en?hl=en>
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to nodejs+un...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/redis-db?hl=en.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to