jhuckaby / megahash

A super-fast C++ hash table with Node.js wrapper, tested up to 1 billion keys.
Other
411 stars 29 forks source link

could you provide a comparison with Redis? #1

Closed kolharsam closed 5 years ago

kolharsam commented 5 years ago

Essentially, Redis is also a key-value data store and is used in plenty of production software. I was just curious to see if you could compare Redis and megahash?

jhuckaby commented 5 years ago

Please understand, these are two completely different products. They really don't compare. Redis is a full blown NoSQL database, with redundancy, concurrency, monitoring, backup, queries, and more. It is a complete, enterprise ready solution, which runs as a standalone process (often on a dedicated server) and used by millions of people.

MegaHash is simply a hash table. Just like an ES6 Map. It is a low-level primitive concept, which runs inside a single Node.js process. It has no redundancy, concurrency, monitoring, backup, queries, or anything.

It would be like comparing a kitchen stove to a cigarette lighter. (MegaHash is the lighter).

MegaHash could theoretically be the building blocks used to create something like Redis. That's really what it is. A low-level underlying building block for developers to use. You have to build an application around it.

Redis is a service. MegaHash is simply a programmer's helper library.

I hope this makes sense. Thank you for your interest tho!

splitice commented 3 years ago

While they may be different products a base line understanding of the difference in performance is very useful for comparison purposes.

While not the exact same test I've done some testing and come up with approx 40-50k set per second in bulk operation <10k if individual to redis with small writes. I have not done extensive testing or optimization however.