Test name | Executions per second |
---|---|
Basic await | 87394.5 Ops/sec |
PromiseAll await | 135734.5 Ops/sec |
async function basicAsync() {
const fetch1 = await fetch(www.google.com);
const fetch2 = await fetch(www.google.it);
const fetch3 = await fetch(www.google.de);
};
async function promiseAllAsync() {
const [fetch1, fetch2, fetch3] = await Promise.all([
fetch(www.google.com),
fetch(www.google.it),
fetch(www.google.de)
]);
};
basicAsync()
promiseAllAsync()