sawa
sawa

Reputation: 2050

bluebird vs async.js performance

I understand that promise libraries provide clarity of code structure. But are they faster?

I am using async.js 'each' to loop through asynchronous xmlHttpRequests. Will it be faster if I adopt bluebird 'all' instead?

Upvotes: 3

Views: 5142

Answers (1)

Max Kroshka
Max Kroshka

Reputation: 487

If you are using ES6 you don't need any external libraries anymore. You could just use built-in functionality. And if you trying to return an array of results of all of your requests you could user Promise.all, which returns a promise as well. To read more about it here is MDN link.

Upvotes: 2

Related Questions