weyoss / redis-smq

A simple high-performance Redis message queue for Node.js.
MIT License
588 stars 64 forks source link

Benchmarks promise vs async/await vs bluebird #48

Closed intech closed 3 years ago

intech commented 3 years ago

Highly optimized: No promises, no async/await, small memory footprint, no memory leaks. See callbacks vs promises vs async/await benchmarks.

@weyoss i assume this statement is out of date. And the event loop has been optimized to work with async/await. Please, check this benchmark

weyoss commented 3 years ago

@intech your assumption is not true.

The point here is about Node.js Callbacks vs Promises.

RedisMQ has been implemented using 100% callbacks. In terms of performance and resource consumption, nothing can beat native Node.js callbacks.

You are talking about event loop optimizations regarding promises, and showing a benchmark of promises (generators vs async/await vs native promises), which is irrelevant.

Include callbacks in your list and you will see the difference.

intech commented 3 years ago

@weyoss You are right, if you compare with callback, then this is my stupidity.